Takamitsu Mizutori
Takamitsu Mizutori

Reputation: 767

How to check a framework contains full bitcode?

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

Upvotes: 0

Views: 2915

Answers (1)

Justlike
Justlike

Reputation: 1504

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.

Upvotes: 4

Related Questions