问题
I am attempting to upload a watchOS3 app to the apple store, however I received a rejection (from apple) thats similar the below
Invalid Executable - The executable 'someWatch Extension' does not contain bitcode. Once these issues have been corrected, you can then redeliver the corrected binary.
How can I resolve this? It seems like bitcode is mandatory as there is no longer a build setting in Xcode for my watch application to simply "Enable Bitcode=No".
I have also tried looking into running swiftc -embed-bitcode *.swift
from my Watch Extensions directory, but I receive the below
MyController.swift:9:8: error: no such module 'WatchKit'
import WatchKit
I really have no clue what to do from here and it UBER frustrating with the lack of documentation out there for watchOS3 to get around this. PLEASE HELP
回答1:
For me the problem was that ENABLE_BITCODE=NO
was set on the project level, and even though Watch did not have it set and should have resolved to YES which is the default for WatchOS, it was still resolved to NO - because of the inherited value from the project.
To resolve it, I removed the ENABLE_BITCODE
value at the project level.
(to do this, select it in the Project Build Settings and press delete button on your keyboard so that text loses its boldness).
来源:https://stackoverflow.com/questions/42942201/bitcode-watchos3-how-to-generate