Fix HealthKit Catalyst build and App Store provisioning - #5264
Merged
Conversation
Guard HealthKit service usage behind iOS (non-Catalyst) checks so the Mac Catalyst target compiles, and update the App Store provisioning profile to include the HealthKit entitlement.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR resolves build/signing regressions introduced by the earlier HealthKit sensors work by ensuring HealthKit-dependent code is excluded from Mac Catalyst builds and (per the PR description) updating the App Store provisioning profile to include the HealthKit entitlement.
Changes:
- Guard
Current.healthKitServiceusage behind#if os(iOS) && !targetEnvironment(macCatalyst)in the sensors settings view model. - Hide the HealthKit settings section entirely when running under Mac Catalyst.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Sources/App/Settings/Sensors/List/SensorListViewModel.swift | Wraps HealthKit service calls in an iOS-only (non-Catalyst) compile-time guard to fix Catalyst compilation. |
| Sources/App/Settings/Sensors/List/SensorListView.swift | Omits the HealthKit settings section from the UI on Mac Catalyst to match platform capability and avoid non-functional UI. |
4 tasks
bgoncal
added a commit
that referenced
this pull request
Jul 28, 2026
## AI Policy - [x] I have read the [Open Home Foundation AI Policy](https://developers.home-assistant.io/docs/ai_policy). Select exactly one option that describes AI usage in this contribution: - [ ] I have not used AI for this contribution. - [x] AI assistance was used for this contribution. - [ ] AI fully generated the code for this contribution, but I've reviewed and understood it before submitting and will respond without AI during review. ## Summary The App Store upload of the iOS build fails with error 90683 because the app now ships the HealthKit entitlement but is missing the `NSHealthUpdateUsageDescription` key in its Info.plist: > Missing purpose string in Info.plist. ... The Info.plist file for the "Home Assistant.app" bundle should contain a NSHealthUpdateUsageDescription key with a user-facing purpose string... Apple requires this key whenever the HealthKit entitlement is present, even for read-only usage. The app only reads Health data (`requestAuthorization` uses an empty `toShare` set), so the purpose string states that no data is written. ## Screenshots No visual change. The string is only shown if write access is ever requested, which the app never does. ## Link to pull request in Documentation repository Documentation: home-assistant/companion.home-assistant# ## Any other notes Follow-up to #4923 and #5264.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI Policy
Select exactly one option that describes AI usage in this contribution:
Summary
Fixes the CI build failures introduced by the HealthKit sensors change (#4923):
SensorListViewModelusedCurrent.healthKitService, which is only defined for iOS (#if os(iOS) && !targetEnvironment(macCatalyst)). The service usage is now guarded behind the same check, and the HealthKit section is hidden on Catalyst.iOS App Store - Appprofile has been updated to include thecom.apple.developer.healthkitentitlement.Screenshots
No visual change on iOS. On Mac Catalyst the (non-functional) HealthKit section is no longer shown.
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes
Follow-up to #4923.