Search code examples
xcodecordovaapp-storeapple-watchcordova-ios

Missing entitlement - 'UIBackgroundModes' value 'workout-processing' without the required entitlement 'com.apple.developer.healthkit'


I have released my app a couple of times and had the process under control until most recently when I updated from XCode 9 to XCode 10 due to a 3rd party lib requirement.

Everything seems fine when I compile and run on the emulator; but, when I come to the "Validate" (Archive) the app prior to uploading to the app store I am getting an error.

My Setup:

  • MacOS 10.14.2 (Mojave)
  • Using XCode 10.1 (10B61)

Error message:

Missing entitlement. watchOS extension 'XXX.app/Watch/aw-xxx.app/PlugIns/aw-xxx Extension.appex' uses 'UIBackgroundModes' value 'workout-processing' without the required entitlement 'com.apple.developer.healthkit' signed into the bundle.

Watch Extension Capabilities: xcode-settings

The app is built using cordova-8.1.1 and cordova-ios-4.5.5

cordova build ios --buildFlag='-UseModernBuildSystem=0'

In addition to that, the project on XCode 10 has been set to 'Legacy Build System' on File -> Project Settings.

Lastly, the 'aw-xxx Extension.entitlements' has the 'HealthKit' key value set to 'YES' under the 'aw-xxx Extension' folder as one could expect.

Any help or pointers would be much appreciated.
I'm happy to provide more info, logs, etc as well, thanks!


Solution

  • After following the comment below I managed to get my app to validate once again on XCode 10:

    Hi @guikeller Just wondering if it is related. I had similar issue while doing a ionic cordova app release. I figured the com.apple.developer.healthkit is missing in my platforms/ios/myApp/Entitlements-Release.plist. It does exist in Entitlements-Debug.plist. All I did is copied the key from the debug file to release and app store accepted it.

    Source: https://github.com/apache/cordova-ios/issues/475#issuecomment-450174628

    In addition to that, I was also able to submit my app into the app store.