简体   繁体   中英

Enable Bitcode is not setting to Yes after upgrading watchOS 1 to watchOS4 in Xcode 9.1

I got this mail from Apple when I tried to submit build after upgrading watchOS. Bitcode was not enabled in the whole app before.

Dear developer, We have discovered one or more issues with your recent delivery for "event****". To process your delivery, the following issues must be corrected: Invalid Executable - The executable 'ProjectName.app/Watch/ProjectName WatchKit App.app/PlugIns/ProjectName WatchKit Extension.appex/ProjectName WatchKit Extension' does not contain bitcode . Though you are not required to fix the following issues, we wanted to make you aware of them: WatchKit 1.0 - Your previous version used an extension for Apple Watch but your current version doesn't. Users who haven't updated their Apple Watch to watchOS 2 or later may lose access to their Apple Watch extension. Once the required corrections have been made, you can then redeliver the corrected binary.

I have googled and followed this link which seems helpful to me but It didn't.

Bitcode WatchOS3 - how to generate

I have one doubt, In my project for iOS targets, bitcode settings are in build option under Build settings but for watchOS targets it comes in User defined settings under build settings.

When I tried to set its value to yes and go ahead to archive the build, at the time of exporting the IPA file it shows the contents of the target, in which it is always showing bitcode is not included. Why it is happening even after setting the yes value, I am totally confused.

I want to set the bitcode value to yes for only watchOS targets.

Thanks

As I have solved this issue by clearing a small confusion which can cause lot of stress to anyother like me. Apple says : For iOS apps, bitcode is the default, but optional. For watchOS and tvOS apps, bitcode is required. If you provide bitcode, all apps and frameworks in the app bundle (all targets in the project) need to include bitcode . So if your app does not having targets for WatchOS(in my case watchOS4 version) then it is ok to enable or disable bitcode settings as per your requirement. But in any case if you have watchOS targets in your app then you don't have any other option rather than enabling the bitcode for whole app targets and then only apple can accept your build for Appstore.

If you enable the bitcode for watchOS targets and disable the bitcode setting for other targets then the build can archive but the bitcode setting inside the build will always show "NOT INCLUDED" and apple rejects it.

And after enabling bitcode if you are using old third party libraries then you have to update each library to the version which support bitcode, it include pods as well. So beware of it because it is not easy task if your app is old and toooooo vast.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM