2

I'd like to create one framework for reuse on iOS (including the simulator) and OS X.

I've seen a SO question that referenced this: https://colemancda.github.io/programming/2015/02/11/universal-ios-osx-framework/ - however I get an error about x86-64 not being supported.

I'm not sure if that's the best way to go about it. Ideally I'd have one project/workspace that I can export one framework to other projects/workspaces where I can use any public class or method. If I had to generate different framework's for each platform from the same project that wouldn't be a big deal either - the goal is to just have to maintain one project that can be re used on each platform.

I've been at this for longer than I'd care to admit so thank you for reading.

Fred Faust
  • 6,696
  • 4
  • 32
  • 55
  • What works for me : Create a workspace, set-up two frameworks, one for iOS and one for OSX. Add nothing to them. Add another group. Put all your files in there and add them to both targets. This has one limitation. Your shared files can not import a Framework that is limited to one Platform, like UIKit. – R Menke Nov 21 '15 at 01:11
  • Ah, that's pretty clean. I'm having a problem with getting the x86-64 for the simulator build when I try to import the framework for iOS. I get two framework files - iphoneos and iphonesimulator. Do you do something like this? http://stackoverflow.com/questions/28652650/how-to-build-cocoa-touch-framework-for-i386-and-x86-64-architecture Or is there someway to bring in each artifact? – Fred Faust Nov 21 '15 at 02:57
  • Never had any trouble with the simulator. I set Build Active Architecture Only to NO in Build Settings. I have come across countless posts about the simulator and frameworks, never had the issue myself (un)fortunately, so I can't really help you out with that :/ – R Menke Nov 21 '15 at 03:08
  • which .framework file do you use in your other project? – Fred Faust Nov 21 '15 at 16:59
  • just the iOS framework. But I am no expert at all. – R Menke Nov 21 '15 at 17:02

0 Answers0