Invalid Info.plist key - HealthKit Standalone Watch App

Hello,

I have finished testing my watchApp on my own device, and I am now trying to publish to use in TestFlight.

I'm getting the below error when I try to upload.

Invalid Info.plist key. The key 'NSHealthShareUsageDescription' in bundle Touch Ref Watch.app/Watch/Touch Ref Watch WatchKit App.app is invalid. With error code STATE_ERROR.VALIDATION_ERROR.90363 for id 1e3c5703-5141-4a51-b60f-5dcaeb0d8be6

I have the following keys in my Watchkit App Info.plist
Privacy - Health Share Usage Description "Health data will not be shared or displayerd by this app"

Privacy - Health Update Usage Description "Workouts tracked will be saved in the health App"

I have the same keys in my WhatchKit Extension Info.plist also.

I am using XCode 12.5 and have no issues with running this app on my own device.

This is resolved.

In case anybody is googling this issue here are the details.

If I added the keys to the extension and the app file, it complained the app file was invalid. If I removed them from the app file, it complained they were missing.

The correct solution is to have the keys in the Info.plist for the EXTENSION, then create a new plist for the [MyApp] target and add the keys to that also.
Invalid Info.plist key - HealthKit Standalone Watch App
 
 
Q