When we develop a dynamic framework and distribute it to reuse. We combine simulator (i386 and x86_64) and device(arm7, arm7s and arm64) architectures into one. So that developer can easily run an app on simulator and device without any error.
If we try to submit the universal framework, AppStore rejects it. In order to fix this error, we use lipo command to remove simulator architectures.
My question is Is usage of "lipo" command recommended by Apple?
You are allowed to use lipo to combine different architectures into a single framework, but Apple forbids the combining of different platforms (macOS and iOS). It seems to work OK, and it's often done for frameworks distributed outside the app store, but Apple says it may stop working at any time in the future.
lipo supports a number of commands for creating universal files from single-architecture files, extracting single-architecture files from universal files, and displaying architecture information. lipo can only perform one such command at a time, although some command flags may appear more than once.
An XCFramework can be either static or dynamic and can include headers.
XCFramework is a new code distribution format introduced by Apple in Xcode 11. The new XCFramework bundle type (similar to framework bundle) now allows to support multiple architectures, platforms and simulator in one package.
Before submitting an app to AppStore, remove the iOS simulator architectures because it is not needed. Is there any indication by Apple that "lipo" will remove or will not work in future. Yes, sorry, I wasn't clear.
I also think Apple will not remove lipo because it is used by xcode itself during the build phase.
You are allowed to use lipo to combine different architectures into a single framework, but Apple forbids the combining of different platforms (macOS and iOS). It seems to work OK, and it's often done for frameworks distributed outside the app store, but Apple says it may stop working at any time in the future.
Using lipo to combine the device architectures with the simulator architectures is not supported. You are allowed to use lipo to combine different architectures into a single framework, but Apple forbids the combining of different platforms (macOS and iOS).
This is an appropriate use for lipo. The Realm database has a script that does much the same thing when you bundle their framework in an iOS app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With