I have number of static libraries, all of them build as a fat library (arm64, x86_64 are architectures).
I'm implementing dynamic framework that works with these libraries. They are added into the frameworks with
As a requirement from a client comes to have also XCFramework. XCFramework is created successfully but only if EXCLUDED_ARCHS flag is set to YES in Simulator build script. If NO this is the error I'm getting:
Also I was thinking to create XCFramework with static libraries and include it in my library. How about this option?
Any advice will be helpful 👍
P.S My framework supports iOS 11, does this mean that I need to have version for armv7 in the static library?
I'm implementing dynamic framework that works with these libraries. They are added into the frameworks with
As a requirement from a client comes to have also XCFramework. XCFramework is created successfully but only if EXCLUDED_ARCHS flag is set to YES in Simulator build script. If NO this is the error I'm getting:
So is this a good approach or could be done better? I've learned today about --library flag on -create-xcframework but don't know whether they fit in my case.... building for iOS Simulator, but linking in object file built for iOS, for architecture arm64.
Also I was thinking to create XCFramework with static libraries and include it in my library. How about this option?
Any advice will be helpful 👍
P.S My framework supports iOS 11, does this mean that I need to have version for armv7 in the static library?
The right way to do this is starting with your Xcode project and running it through the archive process, with additional build settings enabled. Please see the documentation for the exact commands and settings.
When building a XCFramework, regardless if it contains a framework or a static library, you should never need to call lipo. Needing to do so is an indication that you're not following the command recipe in that document. Since this discussion started with questions about architecture build settings, you should also make sure that these settings are all the default values. If you're not sure, make a new Xcode project to look at how those settings are configured by default, and adjust your project's settings to the same.
When building a XCFramework, regardless if it contains a framework or a static library, you should never need to call lipo. Needing to do so is an indication that you're not following the command recipe in that document. Since this discussion started with questions about architecture build settings, you should also make sure that these settings are all the default values. If you're not sure, make a new Xcode project to look at how those settings are configured by default, and adjust your project's settings to the same.