昨天我发现了大量关于parse.com库的警告:
紧急:所有位码将被丢弃,因为'[path]/Parse.framework/Parse(pfanalysis .o)'是没有位码构建的。你必须通过启用bitcode (Xcode设置ENABLE_BITCODE)重新构建它,从供应商那里获得一个更新的库,或者禁用这个目标的bitcode。注意:这将是未来的一个错误。
我知道我可以用这个答案消除这些警告,但现在我想知道它是否会对AppStore提交和/或应用的实际性能产生任何负面影响。
Xcode会通知你有关比特码的信息
激活此设置表明目标或项目应该在编译过程中为支持它的平台和体系结构生成位码。对于存档构建,位代码将在链接二进制文件中生成,以便提交到应用程序商店。对于其他构建,编译器和链接器将检查代码是否符合位码生成的要求,但不会生成实际的位码。(ENABLE_BITCODE)
但我并没有从这篇文章中得到任何真正有用的信息。
我可以使用链接的答案来规避这个问题,而不产生任何负面影响,也不会影响未来的AppStore提交吗?
ENABLE_BITCODE实际上是做什么的,将来它会是一个非可选的需求吗?
如果我启用/禁用它会对性能有任何影响吗?
比特码是iOS 9的新功能
Bitcode is an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the App Store. Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new version of your app to the store.
Note: For iOS apps, bitcode is the default, but optional. If you provide bitcode, all apps and frameworks in the app bundle need to include bitcode. For watchOS apps, bitcode is required
所以你应该禁用位码,直到你的应用程序的所有框架都启用位码。
XCode 14 Beta版已弃用Bitcode:
https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes
Starting with Xcode 14, bitcode is no longer required for watchOS and tvOS applications, and the App Store no longer accepts bitcode submissions from Xcode 14.
Xcode no longer builds bitcode by default and generates a warning message if a project explicitly enables bitcode: “Building with bitcode is deprecated. Please update your project and/or target settings to disable bitcode.” The capability to build with bitcode will be removed in a future Xcode release. IPAs that contain bitcode will have the bitcode stripped before being submitted to the App Store. Debug symbols for past bitcode submissions remain available for download. (86118779)
对于任何想了解比特码的人来说,比特码似乎不再是必要的了。