Hello fellow developers,
I'm using Xcode 14, MacOS 13.2, and trying to make an iPhone and Apple Watch companion app using HealthKit. I'm getting the following error:
Code=4 "Missing com.apple.developer.healthkit entitlement." UserInfo={NSLocalizedDescription=Missing com.apple.developer.healthkit entitlement.}
From this line of code:
private var healthStore = HKHealthStore()
Since Xcode there is no Info.plist file and I've tried adding it but the build fails if I add a properties file that is called Info.plist.
I've seen recent documentation that states to use project -> Info -> Custom iOS Target Properties and values such as:
"Privacy - Health Update Usage Description" and add a description greater than 12 characters. However, this property and other properties that I add to this section section disappear when I navigate away from that tab.
This is weird because if I try to re-enter that value, I am presented with a dialog that states, "Replace Existing Pair". Again, I can add it and then navigate away and it disappears.
Regardless, I can't find any documentation in the Apple developer forums or any other part of the Internet. Is this a bug?