6

I'll be creating an app that will start it's life as an iPhone app. Then a OS X application with very similar functionality will be developed. Both apps will share a lot of code base and rely heavily on content stored in Core Data, so it seems logical to me to store everything in one Xcode project.

Q1. Is this a good idea and can it be done ? What is the best way to set this up?

Q2. I'm looking to sync the Core Data content via iCloud (between the iPhone app and OS X application), can someone point me to a good source on how this works (I'm a registered Apple developer but can't seem to find it)

Q3. An iPad version may come out later, should I start with a Universal app or convert it later ?

Glenn
  • 2,808
  • 2
  • 24
  • 30
  • good question..I would like to get an answer to this question too..BTW http://stackoverflow.com/questions/4579849/port-an-ios-iphone-app-to-mac might be of help..This is not a direct answer to your question..So I am posting it as a comment – Krishnabhadra Jul 19 '11 at 09:12
  • Thank you, Krishnabhadra, it's indeed an interesting case. However I do plan to create a new UI which is really fit for OS X so users there can have the 'best' interface experience. The reason I want to combine it is that there is a lot of database stuff that is going on and I want to keep that stuff in sync and the code as DRY as possible – Glenn Jul 19 '11 at 09:17

2 Answers2

7

This should be created in a single workspace in Xcode 4. I would look to create separate projects for the OS X and iOS applications, but store the shared code in another project which would have multiple targets - one for the static library for iOS and one for OS X. Each project would need to be configured to include the correct library from the shared project.

For Core Data, watch the 'What's new in Core Data for iOS' session video from WWDC 2011 (obviously requires an Apple developer account):

http://developer.apple.com/videos/wwdc/2011/includes/whats-new-in-core-data-on-ios.html#whats-new-in-core-data-on-ios

dtuckernet
  • 7,817
  • 5
  • 39
  • 54
1

I would take a look at the Chameleon project which may help you out for your OS X port.

http://chameleonproject.org/

Also the iCloud stuff should not be talked about here as it is under NDA.

As for the universal it is up to you, you can convert to Universal at a later stage if you don't want to do the work now.

Lee Armstrong
  • 11,420
  • 15
  • 74
  • 122
  • Chameleon is not officially supported. – Mugunth Jul 19 '11 at 09:23
  • Not asking to discuss the iCloud stuff here, just to point me to some URLs on the devforums.apple.com or any appropriate source ;) – Glenn Jul 19 '11 at 09:46
  • @mugunth-kumar You comment is confusing. What do you mean by it is not officially supported? It's just a bunch of Obj-C that mimics UIKit with the aim of aiding iOS developers port applications to the desktop. It uses no private frameworks, and applications that use it are already available in the Mac App Store, such as Twitterific. I would highly recommend Chameleon if you plan on developing an app for both iOS and desktop and have it share a common code base. –  Jul 19 '11 at 11:10
  • IconFactory doesn't officially support Chameleon project. So if it doesnt' work for a specific case in your project, you might have to dig a lot around the core. Not worth the time. And I wouldn't say Twitterrific is a great Mac App that sets "trends". – Mugunth Jul 20 '11 at 07:17