mattsven
mattsven

Reputation: 23303

Is it possible to create a fat framework for iOS, Simulator, *and* Mac?

I have a simple C library that I'd like to distribute as a single framework for all three platforms — iOS, Mac, and the iOS Simulator. I'm aware of the fact that it's possible to configure Xcode (or use lipo) to generate a fat framework that contains the arm architectures and the i386/x86 architectures, but from my testing it appears that the overlap between the shared architectures of the iOS Simulator and Mac leaves room for only one or the other (Xcode gives warnings when using the Mac x86_64/i386 binary compiled for the simulator.)

Is this at all possible?

Upvotes: 4

Views: 859

Answers (1)

TheNextman
TheNextman

Reputation: 12566

xcframework is new in Xcode 11, and may make this possible. From the Xcode 11 Beta Release Notes:

XCFramework make it possible to bundle a binary framework or library for multiple platforms —including iOS devices, iOS simulators, and Mac Catalyst — into a single distributable .xcframework bundle that your developers can use within their own applications. An .xcframework bundle can be added to an Xcode target’s Link Libraries phase and Xcode uses the right platform’s version of the included framework or library at build time.

And you already linked to the relevant talk from WWDC 2019

Upvotes: 4

Related Questions