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?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Developer
  • 81
  • 1
  • 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. – Sachin Vas Nov 02 '16 at 10:18
  • 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?](//meta.stackoverflow.com/q/272165) – Makyen May 23 '18 at 23:58

1 Answers1

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.

Rudedog
  • 4,323
  • 1
  • 23
  • 34
  • 1
    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. – Developer Nov 02 '16 at 20:53
  • @Developer Apple will never remove the lipo command because Xcode requires it. – Rudedog Nov 03 '16 at 18:07
  • Also, I believe that Apple does not yet support distributing Swift frameworks as binaries. [This post](https://developer.apple.com/swift/blog/?id=2) is a little old but as far as I know it still applies. Perhaps with Swift 4, binary frameworks will be supported. – Rudedog Nov 03 '16 at 18:16
  • Could you please tell me for which purpose specifically Xcode requires "lipo" command – Developer Nov 04 '16 at 01:42
  • 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. – Rudedog Nov 04 '16 at 01:45
  • 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 http://arsenkin.com/ios-universal-framework.html – Developer Nov 04 '16 at 06:40