I was able to get xcframework + simulator fat binary working. I needed to have an xcframework that supported simulator on both arm64 and x86_64 because I'm developing on an M1 and my CI provider wants x86_64 to run unit tests. (Oh, and having an xcframework that can be used to develop on Intel might come in handy at some point.)
My steps:
Build three frameworks (in my case, arm64, arm64-simulator, x86_64-simulator)
Build xcframework with arm64 and arm64-simulator frameworks
Use lipo to add x86_64-simulator binary to the arm64-simulator binary (which is inside my xcframework)
That's it. I ended up modifying my xcframework's Info.plist file to document the fact that the second "library" was a fat binary (adding "x86_64" to the "SupportedArchitectures" array) but that doesn't appear to be necessary.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: