Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

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

Would like to ask how best to resolve this issue ?

Follow-ups: Apple Watch requires bitcode-enabled libraries, based on this New warnings in iOS 9 -> we may have to enable bitcode for all libraries ..

like image 571
Felix Avatar asked Jul 10 '15 01:07

Felix


1 Answers

According to Apple's [App Thinning and Bitcode]

Quote: 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.

So I can turn off the Bitcode in Build Settings for iPhone app, and enable Bitcode for Watch app only.

like image 54
Felix Avatar answered Sep 21 '22 23:09

Felix