0

From Xcode7, any framework built with your app should have bitcode if you want to enable bitcode support for your app. I'd like to know a way to check whether a framework project has bitcode or not. There is a similar question here (How to check if a framework is BITCODE supported for Xcode7), but the answers there are about checking bitcode of static libary file of .a or .o extention.

I want to check the existence of bitcode inside .framework package, and have been wondering there should be a way to check it on .swiftmodule files inside a .framework package.

(One of the reasons I want to know is that I'm trying to support bitcode in my own framework project, but have never succeeded in doing so since I got missing-bitcode error when I exported my framework package to an app project and built the app. I thought it's nice to have a tool to check it directly rather than knowing it after embedding it to an app project and building the app.)

Community
  • 1
  • 1
  • you mean [bytecode](https://en.wikipedia.org/wiki/Bytecode)? – cat Jan 21 '16 at 03:18
  • @cat Check the link below about Bitcode https://developer.apple.com/library/prerelease/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html#//apple_ref/doc/uid/TP40012582-CH35-SW3 – Takamitsu Mizutori Jan 21 '16 at 03:23

1 Answers1

4
otool -l binary_name | grep __bitcode

you will see one or more segname __bitcode entries if it does have bitcode or empty output if does not.

Justlike
  • 1,476
  • 10
  • 18