Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is usage of "lipo" command recommended by Apple?

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?

like image 460
Developer Avatar asked Nov 02 '16 10:11

Developer


People also ask

What is Lipo 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.

What does Lipo command do?

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.

Is XCFramework static or dynamic?

An XCFramework can be either static or dynamic and can include headers.

What is XCFramework?

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.

Should Lipo be removed before submitting an app to Appstore?

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.

Will Apple ever remove Lipo from Xcode?

I also think Apple will not remove lipo because it is used by xcode itself during the build phase.

Is it possible to use Lipo to combine two frameworks?

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.

Can I use Lipo to combine device and simulator architectures?

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).


1 Answers

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.

like image 132
Rudedog Avatar answered Oct 06 '22 20:10

Rudedog