I'm trying to validate and Apple Watch app to put it into TestFlight.
However, I'm facing a conundrum with an error in the process relating to the NSHealthShareUsageDescription.
I get the following issues:
Validation failed
Invalid Info.plist key. The key 'NSHealthShareUsageDescription' in bundle PokeWalker.app/Watch/PokeWalker WatchKit App.app is invalid.
(ID: 2bae77a5-6690-4975-b059-90d36ed0194b)
Validation failed
Invalid Info.plist key. The key 'NSHealthUpdateUsageDescription' in bundle PokeWalker.app/Watch/PokeWalker WatchKit App.app is invalid.
(ID: 786bf99f-1c40-436b-920c-393143eaaa6a)
I don't know how to fix this error. If I remove those keys from the Info.plist file the app will not build.
I have found this post on the apple developer forum with someone with the same issue, but I don't know what their solution means and how to implement it in my own app.
Here is the structure of my project, if that helps. There are 3 Info.plist files in total:
I managed to resolve this thanks to this quote I found on a website.
I saved this quote to my notes and implemented it, but now I can't find the original source.
Anyway, I had to remove the NSHealth stuff from the watchkit app, but keep it in the main app the watchkit extension app.
Thank you that solved my problem. I actually added this to both info.plist files for the extension and the WatchKit app. It errored out so I removed both, which was my fatal error. So again, you must have these keys in the main app and the watchkit extension app but cannot have the keys in the watchkit app.