Read your article on making a fat framework binary for iOS and Mac OS (http://colemancda.github.io/programming/2015/02/11/universal-ios-osx-framework/). I built my framework and imported to another project, but I'm getting this error when building the second project for iOS "ignoring file /Users/mredig/Desktop/Dev/test game/SKUtilities2.framework/SKUtilities2, file was built for x86_64 which is not the architecture being linked (i386): /Users/mredig/Desktop/Dev/test game/SKUtilities2.framework/SKUtilities2"
Now, I'm not really sure I built it right as I can't yet figure out how to build an "archive" build of my framework (as that's how I understand deliverable binaries are supposed to be built), so it's possible it's reverting to the "build active architecture only" setting (although I set it to no). It also may be a misunderstanding on my part as I'm understanding it to mean I can have one framework built in a single go to service iOS and Mac OS (and I hope tvOS as well) that contains the binary data for all three in a fat binary, but if it's just a way of consolidating your project to be able to change one simple build setting (and then still build a separate version for iOS and OSX), then I missed something.
@mredig Hi! Thank you for the blog post, I was trying to use it for tvOS as well (share code between iOS, macOS and tvOS) but without success, in theory I only have to add "appletvsimulator" and "appletvos" to supported architectures and it should work?
Hi! It was a nice solution to make framework working on both iOS and OS X platforms. But I have a question: since both iOS and OS X have Text Kit classes, like NSTextStorage, NSLayoutManager, is it possible to make a universal framework which will be using, let's say, NSTextStorage subclass? I've tried but I failed because 'import' statement doesn't work in conditional scope (like if iOS import UIKit, if OS X import AppKit)
Hello, I have used your solution which I had originally created a Cocoa Touch Framework project that has my shared source code and then I changed Base SDK (Latest macOS), Supported Platforms (macosx iphonesimulator, iphoneos), Valid Architectures (arm64 armv7 armv7s i386 x86_64), and etc. like you said and it compiles just fine. I created my private cocoapods and installed for the iOS app and it works fine but for the Mac app it's not seeing anything for my "import CommonFramework". Any idea why that's not working?