Currently I have both the HealthKit and access to HealthKit records.
How do I add com.apple.developer.healthkit.background-delivery to entitlements in swift/Xcode?image of current entitlement
capability for HealthKit is also turned on healthkit capability
Provisioning profile "iOS Team Provisioning Profile: blah for blah contains entitlements that aren't in the entitlements file: com.apple.developer.healthkit.background-delivery. To use these entitlements, add them to your entitlements file. Otherwise, remove unused entitlements from your provisioning profile.
To add this entitlement to your app, first enable the HealthKit capability in Xcode, and then check any values that you want to add to the HealthKit Capabilities Entitlement. Only add values for data types that your app needs to access. App Review may reject apps that don't use the data appropriately.
In your project's “Signing & Capabilities” panel, turn on the App Sandbox. This creates a new entitlement file in your project with the same name as the app target. Select the entitlements file. Click the Add button (+) to add a new property to the entitlements file.
You can add entitlement from Project Target. Note in Xcode 11.3 (and some earlier versions) the tab is "Signing & Capabilities" and capabilities are added using "+ Capability" at the top left corner of the tab subwindow instead of via the on/off switches.
During code signing, the entitlements corresponding to the app's enabled Capabilities/Services are transferred to the app's signature from the provisioning profile Xcode chose to sign the app. The provisioning profile is embedded into the app bundle during the build.
To add a package dependency to your Xcode project, select File > Swift Packages > Add Package Dependency and enter its repository URL. You can also navigate to your target’s General pane, and in the “Frameworks, Libraries, and Embedded Content” section, click the + button, select Add Other, and choose Add Package Dependency.
A package author can publish their Swift package to either public or private repositories. Xcode supports both private and publicly available packages. To add a package dependency to your Xcode project, select File > Swift Packages > Add Package Dependency and enter its repository URL.
To start, choose Product > Archive, which builds the tool target and then the app target, embedding the result of the former within the latter. In the Xcode organizer, select the newly created archive and click Distribute App.
Select the ToolX scheme and chose Product > Build, just to make sure that the tool builds correctly. Now switch back to the app ( AppWithTool) scheme. In the Build Phases tab of the app target editor, add the ToolX target to the Dependencies build phase. This ensures that Xcode builds the tool target before building the app target.
Had the same warning.
Add a new key com.apple.developer.healthkit.background-delivery
to your entitlements file, use boolean type and set this to 1.
Apple Source: com.apple.developer.healthkit.background-delivery
Solved the issue for me. Screenshot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With