Is usage of "lipo" command recommended by Apple?
Asked Answered
O

1

8

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?

Oboe answered 2/11, 2016 at 10:8 Comment(2)
lipo, a Mac OS X command line utility for the manipulation of Mach-O universal binary object files. So, you can check with the support team in Apple I guess.Ruinous
I'm voting to close this question as off-topic because it is about publishing to an "app store" and/or the store's policies and procedures, rather than programming. See Are developer-centric questions about application stores on topic?Villatoro
V
2

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.

Valente answered 2/11, 2016 at 13:42 Comment(6)
I am actually thinking if we use "lipo" command to create universal framework. Will there be any chance that Apple removes this command altogether and breaks the framework building process. Moreover, can we use "lipo" command to create swift based universal framework.Oboe
@Oboe Apple will never remove the lipo command because Xcode requires it.Valente
Also, I believe that Apple does not yet support distributing Swift frameworks as binaries. This post is a little old but as far as I know it still applies. Perhaps with Swift 4, binary frameworks will be supported.Valente
Could you please tell me for which purpose specifically Xcode requires "lipo" commandOboe
It's used to assemble fat binaries. Pretty much the same thing you're doing. Try building an app (make sure you have the "build for all architectures option set), then have a look at the build log. You'll see that the build uses lipo to create the final product.Valente
I don't think so there is any option like "build for all architectures" in Xcode. I have always used the script to build the universal framework. Sample script is describes here arsenkin.com/ios-universal-framework.htmlOboe

© 2022 - 2024 — McMap. All rights reserved.