3

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

LostJon
  • 2,287
  • 11
  • 20

1 Answers1

2

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

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Miroslav Kovac
  • 1,168
  • 1
  • 16
  • 27
  • This is EXACTLY what I had to do. There was a User-Defined key that was bypassing the default for bitcode in xcode. – LostJon Mar 31 '17 at 13:33
  • the question is he doesn't have the settings at all, and you suggesting the setting that is his existing issue. instead answer should be as how we can disable it when no option is seen in Xcode. Apple error is to add this value not remove it. "Missing" is mentioned not disabled – codelover Dec 16 '17 at 04:30
  • Yes, Enable "BITCODE=YES" works to me too. You may get a notification email from Apple after uploading app to App Connects. – Exile3daime Jan 05 '19 at 16:25