Re: OS + iOS best practice
Re: OS + iOS best practice
- Subject: Re: OS + iOS best practice
- From: Jens Alfke <email@hidden>
- Date: Fri, 03 Jun 2011 11:41:43 -0700
On Jun 3, 2011, at 11:04 AM, Amy Heavey wrote:
> I've got a fairly basic core data app that I've written for personal use on my iMac. I'd like to have an iPad version as it would be very useful to have whilst I was mobile. (It's basically a customer/product database).
>
> Is there a best way to manage sharing the data between an OS and iOS version? I assume it will be possible as long as they use the same datamodel.
Yup. In fact I would try to share all of the model-related code between the two apps, to ensure that all the ‘business logic’ [I hate that word] is consistent.
The easiest way to share the data is to use the file transfer feature of iOS 4, which will let you clumsily use iTunes to copy files to and from the iPad. It looks really simple to implement — IIRC most of it is just declaring in your Info.plist that you support the feature, and then specifying a subfolder of your Documents folder where copied files will live.
Dropbox sync is a lot smoother, of course. I am not sure if there is a convenient Cocoa library to use for that. Coding it yourself probably isn’t too hard if you know your way around NSURLConnection, especially if you want to ignore niceties like the ability to browse folders in the dropbox.
In the long run this will be an excellent use case for CouchDB (a document-oriented data store that excels at syncing), but the iOS version of that is still very much beta, and there’s no high-level API for it yet that gives you anywhere near the convenience of CoreData. [I’m starting to design one, though…]
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden