Set up HealthKit on iOS
Real HealthKit behavior requires a physical iOS device and an App ID whose signing profile includes HealthKit.
Configure HealthBridge
Section titled “Configure HealthBridge”- Open Edit > Project Settings > HealthBridge > iOS.
- Replace fallback text with product-specific read and update explanations.
- Enable only the required read and write types in
HealthBridgeSettings. - Confirm the project bundle identifier matches the HealthKit-capable App ID.
The iOS build processor adds HealthKit framework linkage, usage descriptions, entitlements, and required Swift settings to the generated Xcode project.
Configure Apple signing
Section titled “Configure Apple signing”- Enable HealthKit for the Apple App ID.
- Refresh development and distribution profiles after enabling it.
- Configure the matching team/profile in Unity or the signing pipeline.
- Verify the final signed application contains the HealthKit entitlement.
Build processing cannot make an App ID HealthKit-capable or replace an invalid provisioning profile.
Initialize
Section titled “Initialize”Use AutoInitializeAsync in the iOS player. You may call PrewarmAsync before
the user-facing authorization step; prewarming does not display the system
sheet.
Understand authorization
Section titled “Understand authorization”Apple does not reveal every per-type read decision:
- Initialization can succeed after the sheet closes even if a read type was declined.
- Denied reads can appear as successful empty results.
- Write denial can fail without a detailed per-type disclosure.
Provide an empty state and instructions for reviewing Health access in iOS Settings or the Health app.
Package and verify
Section titled “Package and verify”- Build the project for a physical device.
- Inspect usage descriptions and signed entitlements.
- Install the exact artifact being tested.
- Test full grant, denial, empty data, write denial, background, and recovery.
The editor and simulator do not prove real HealthKit behavior.
