Rails 3 / PhoneGap: Converting a Rails app into an Phonegap iOS app?

14,369

Solution 1

I'm new to Phonegap too, but I'm exploring the same idea than you and I've found this useful screencast: "PhoneGap + Rails 3 API" http://vimeo.com/18763953

The idea is that you make an HTML5 client side app that makes calls to a Rails API on the server side.

Here is the code of the screencast demo:

Hope it helps!

Solution 2

I think it could be relevant to check my phonegap-rails gem gem and my example rails / ember.js App that is exported with Phonegap. It also implements token authentication based on ember-auth and several OAuth strategies on top of Devise.

Currently in de the devel branch: https://github.com/joscas/base_app/tree/devel

Heroku deploy: https://starter-app-staging.herokuapp.com (the desktop version)

The gem exports assets, fixes paths etc. to allow seamless export of single page apps based on a rails backend.

Solution 3

At 37 Signals they rendered their html SERVER SIDE and just created an app wrapper. Here's the article: https://signalvnoise.com/posts/3743-hybrid-sweet-spot-native-navigation-web-content This is an important difference in most approaches as most will re-develop their front end using a client side framework and it has the potential to save users a bunch of time. The downside is that I've heard rumors you can't get into the iOS app store, but it doesn't seem like they had a problem with it. There's also services like GoNative.io that will wrap your app for you.

Share:
14,369

Related videos on Youtube

trying_hal9000
Author by

trying_hal9000

Updated on June 06, 2022

Comments

  • trying_hal9000
    trying_hal9000 almost 2 years

    I have a site built on top of Rails. In essence, I want to release a lightweight version of it for the appstore, and I think Phonegap is a good solution w/o writing a full iOS application.

    What would be the easiest way to get something like this out of the door? I'm new to PhoneGap and would love if an experience dev could shed some light on how with is done. I feel it would also be a valuable resource for many other Rails devs.

    My rails 3 app uses devise for authenication, carrierwave for file processing, amazon S3 for storage, and Heroku for hosting. Can someone give me some basic insight into how all these components are wrapped up and ablwe to be used with PhoneGap?

  • Fabrizio Bertoglio
    Fabrizio Bertoglio about 7 years
    hello. I am opting to building a Ruby on Rails Json api with front end Ionic App. What do you think about it? Will phonegap be way easier and faster? I thought it is not a good idea to invest so much work with phonegap if the app will not be published in the store