Xcode 7: -weak_library and -bitcode_bundle cannot be used together

When deploying to iPhone and Apple Watch with Xcode7, I got this error:

ld: -weak_library and -bitcode_bundle (Xcode setting ENABLE_BITCODE = YES) cannot be used together

I would like to ask, what is the best way to solve this problem?

Follow-up: Apple Watch requires a library that supports bitcodes based on these new warnings in iOS 9 - → we may need to enable the bitcode for all libraries.

+6
source share
2 answers

According to Apple [Destruction of applications and bitcode ]

Quote: For iOS applications, the default bitcode, but optional. If you provide a bitcode, all applications and frameworks in the application bundle must include a bitcode. WatchOS applications require a bitcode.

Thus, I can turn off the bitcode in the build settings for the iPhone and only enable the "Bitcode for viewing" application.

+2
source

Also, if you are developing for apple tv a bitcode is also included.

This is rather annoying as many third-party ad platforms and analysts have not compiled their binaries for tvOS yet, but they are looking forward to it soon.

0
source

All Articles