Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add this entitlement in Xcode/Swift com.apple.developer.healthkit.background-delivery?

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.

like image 849
Sandy Avatar asked Jul 07 '21 21:07

Sandy


People also ask

How do I add entitlement to HealthKit?

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.

How do I add entitlements in Xcode?

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.

Where is entitlements in Xcode?

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.

What is code signing entitlement Xcode?

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.

How do I add a package dependency in Xcode?

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.

How do I publish a swift package to Xcode?

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.

How do I distribute an app to a product in Xcode?

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.

How to build a toolx target in Xcode?

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.


1 Answers

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

like image 103
bildstrich Avatar answered Oct 11 '22 15:10

bildstrich