Multiple Build Targets (iOS, Mac, and Android

Hello Community,

I am trying to figure out the best way to use XCode to build an application that can target iOS, Mac, and Android devices from one codebase.

I have downloaded the iOS_0.8.4 addons, and I can run the samples with a few work arounds. I also currently have the OF_Frameworks_0.8.4 from which I am building a project.

Ideally, I’d like to have a shared code base. What are suggestions on doing this, for those who have been able to successfully deliver to multiple devices from one codebase.

My ideas:
1.) Add new projects to XCode that are from the emptyExample of iOS, android, and Mac. Then just add the same source files to the project (i.e. the same files from a ‘src’ folder), EXCEPT for the main’s, which may be slightly modified (because on MAC, I cannot do touchEvents for example).
2.) Use some #defines to comment out all touch events that aren’t relevant for the Mac version, and try to add the Build_targets for iOS 6, android, and Mac to a single project.

Thanks for any help!

Of course it’s a desirable workflow, but as far as I know it is impossible with the build system we have right now. Every platform has its own set of libraries, it gets a little bit messy even with iOS itself (I can’t run iOS apps in a simulator on my mac due to lack of some libs for i386 platform), so I can’t really imagine going that much more integrated with all the major mobile platforms + mac right now. Aloso, Android works with all different compiler and build system and I don’t think you can tie it up to XCode at all. Well, someone could do it, but right now it’s not supported.

But I’d love to have it working like you described:).