Step by Step Solution –
I appreciate all the replies to this question, it took me a while, but I also figured it out. I thought I would write a reply with a step by step for all the casual developer like me.
I made an Apple Watch only app that incorporates the health kit and just like Apple demonstrates I included the info.plist user facing string describing what I will be doing with the information, just displaying it while the workout is active and saving the workout data once concluded. This resulted in getting the errors from apple upon uploading, and 14 builds later I finally got it to work!
Here is how I did it, following the other answers on this page (I definitely didn’t figure it out on my own – Thank you so much everyone!)
Step 1. Make sure you have both “Privacy – Health Share Usage Description” and “Privacy – Health Update Usage Description” in the [Your App] Watchkit Extension, Info.plist. This is the one that Apple shows in their videos and documentation. (assuming that’s what you’re using, if you have other permissions, maybe it will work the same way and just include the ones you need)
Step 2. Make a new folder in the finder on the left side of xcode – this is easier to do inside the [Your App] Watchkit Extension, and then drag it to be on the same level as the [Your App] Watchkit Extension. Name this folder [Your App].
Now you have a project (Your app) at the top with the folders, [Your App]
(The new one you made), [Your App] Watchkit App, [Your App] Watchkit Extension, Products and frameworks. (Maybe a few more based on your own app, but that’s the basics.
Step 3. Right click the newly created [your app] folder, click “new file”, in the template menu find “Property list” under “Resources” options and click it. Do not give it a target! Keep those blank. Do this when adding it by deselecting all the targets. Once created confirm there are no targets by clicking it and with the far right “Inspector Window” open look at “Target Membership” none of them should have a check mark. In the same “Inspector Window” rename it “Info.plist”.
Step 4. Right click on the new “Info.plist” and “open as” -> “Source Code”.
Step 5. It seems that it doesn’t automatically show you the options to include things like “ Privacy - …” when you start typing so the easiest thing for me was just to paste the code provided in another answer which was :
Code Block <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
<plist version="1.0"> |
<dict> |
<key>NSHealthShareUsageDescription</key> |
<string> YOUR DESCRIPTION HERE </string> |
<key>NSHealthUpdateUsageDescription</key> |
<string> YOUR DESCRIPTION HERE </string> |
</dict> |
</plist> |
Change the “Your description here” parts up in the code so that it is the same as your [your app] watchkit extension, plist, strings. Per Apples request, just write in clear language why you want access to it.
Step 6. In the far left “Navigator Window” Click on (Your App) Project, the main one at the top all the folders are in that is an “xcodeproj” file, that should bring up your info – settings screen in the main editor (Center) part of xcode. Make sure you choose your project and not the targets on the left side of the main editor part. This is where it’s hard to describe for a casual coder like me. It’s in the same area where you put the version and build numbers, but the project is selected and not the targets.
Step 7. Choose “Build Settings” at the top center and scroll down until you see “Packaging” Then look for “info.plist File”. Click on the column that has “[your app]” at the top so you can bring up the window where you can edit. It’s just a large square window but that’s where it goes. Include the link to the new plist you made by typing “[your app]/Info.plist. I did this for both the release and debugging so they are the same and it makes one row.
Step 8. Clean your build folder with the hotkeys or just go to “Product” -> “Clean Build Folder”
Step 9. Test your app, it should work, it worked for me. Upload your app… it also should work. I was afraid I’d get yet another email from apple telling me about my “invalid” binary… but not this time! This time it worked.
Thank you for everyone that replied to this question. I took all your answers and bundled them into one big step by step made for people as inexperienced as me. There is one more reply that talked about going into the archive file and changing it by hand… that was going to be my final try but I didn’t have to do it with these steps. If you’re still having trouble maybe that would be your answer.