Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating iphone & android apps for existing rails app

I've just spent a lot of time looking into the best ways to create iphone and android apps for an existing rails app that I've built and I feel that I haven't actually gotten any closer to knowing how to best achieve this.

What I want:

  • I would like to have the rails app and the mobile code cleanly separated. I'm not looking to just render a different layout in my rails app. I'd prefer to use something like phone gap that allows me to use roughly the same codebase to run the mobile apps.
  • I'd like to have offline/sync capabilities in the mobile apps (hence if a user creates a record on their iphone while they are out of coverage the app should save the record on the phone and continue to try to to sync that record to the web app until success.
  • Having access to the hardware features will be needed down the road. GPS, accelerometer, etc.

My questions:

  • Is this a good situation to use oauth? Would I just build an oauth provider into my web app and then build the two mobile apps as clients to the web app?
  • Is there an easier method for secure authorization that I'm missing?
  • Does Devise work with oauth? My app is built on top of devise at the moment.
  • Is this syncing something that should be abstracted to a middleware or metal?

Sorry, I know this is actually a lot of questions but I'd like someone who is familiar with the situation to answer in a comprehensive manner rather than just a couple little pokes that leave more questions. I feel like this has to be a common situation now-a-days but I can't seem to find anything up-to-date in my searches.

Cheers!

ps. - If you've done something like this yourself and know how to pull it off, I'd love to talk to you directly. I'll even buy the beers. Seriously... no takers?

like image 414
erskingardner Avatar asked Oct 21 '10 12:10

erskingardner


People also ask

How to create an iPhone app?

The final way to create an iPhone app is to pay a developer to do so. You’ll need to work with an expert to finalize the plan for your app and then actually put it into practice. The first step is to find someone (within your budget) whose speciality is to develop iOs apps.

How to create an iPhone app without coding?

Create your iPhone app without coding. Create your iPhone app without programming. With the app maker for iPhone you can create your apps in no time and without IT knowledge . With the iPhone app maker for the iOS operating system (and Android) you can easily build your own iPhone apps!

How do I create an Apple ID?

Use iTunes on your Mac or PC. From the menu bar at the top of your computer screen or at the top of the iTunes window, choose Account > Sign In. Then click Create New Apple ID. Read and agree to the Terms and Conditions and Apple Privacy Policy. Complete the form to create your new Apple ID. The email address you provide will be your new Apple ID.

How do I create a group on my iPhone?

The first requires that you have iCloud Contacts set up on your iPhone, which we’ll cover below. Then you’ll need to get on your computer to officially create the contact group, afterwhich you’ll be able to access on your iPhone. The other way you can create groups on your iPhone is with the app, Groups.


1 Answers

I am building a mobile application with a grails backend, must support android and iphone

I have done a few iterations so far while attempting to settle on technology, a native objective-c, native android, phoneGap and titanium appcelerator.

for authentication I use HTTPS with basic auth. I know people are concerned about basic-authentication, but it has been argued both ways see this StackOverflow Question

I have not solved the syncing problem yet, but I dont expect to implement that complex of a solution initially, will store local content (XML or JSON) and push back to server on demand. Content is stored locally in same format used when posting to server

Backend in grails, all REST API calls are logged and authenticated on each request. Will probably add additional security only allowing specific registered devices to access the API as and additional level of security

like image 135
Aaron Saunders Avatar answered Oct 02 '22 06:10

Aaron Saunders