I am experiencing a critical issue with HealthKit authorization in iOS 18.5 where requestAuthorization() calls are immediately denied without showing the user permission dialog.
Problem Description:
HealthKit authorization requests immediately return .sharingDenied status
No system permission dialog is displayed to the user
Authorization status changes from .notDetermined to .sharingDenied in <0.1 seconds
This occurs for all HealthKit data types (step count, heart rate, sleep analysis, etc.)
Technical Details:
iOS Version: 18.5 (22F76)
Xcode Version: 16F6
Device: iPhone (tested on both simulator and physical device)
Bundle IDs tested: com.hereforyou.test2024, com.hereforyou.app
Entitlements: com.apple.developer.healthkit = true
Code Implementation:
let healthStore = HKHealthStore()
let stepType = HKObjectType.quantityType(forIdentifier: .stepCount)!
// Status before request: .notDetermined
try await healthStore.requestAuthorization(toShare: [], read: [stepType])
// Status after request: .sharingDenied (immediate, <0.1 seconds)
Evidence this is not a code issue:
Other HealthKit apps from App Store work correctly on the same device
Proper entitlements are configured and verified
HKHealthStore.isHealthDataAvailable() returns true
Same code worked in previous iOS versions
Multiple Bundle IDs tested with same result
Expected Behavior:
System should display HealthKit permission dialog allowing user to grant/deny access
Actual Behavior:
Authorization is immediately denied without user interaction
Steps to Reproduce:
Create new iOS app with HealthKit entitlements
Call requestAuthorization() for any HealthKit data type
Observe immediate denial without permission dialog
Is this a known issue in iOS 18.5? Are there any workarounds or timeline for a fix?
Best regards
Topic:
App & System Services
SubTopic:
Health & Fitness