Posts

Post not yet marked as solved
0 Replies
589 Views
Hello everyone, I hope someone will be able to help. We have a fitness application where we ask users for some HealthKit permissions (write and read workouts, routes, walkingAndRunningDistance, etc.). After some time on the AppStore, we have made an update where we need to write steps and read basal and active energy. After the app starts we are asking users to allow these permissions using built-in HK permissions popup using method. HKHealthStore().requestAuthorization(toShare: typesToWrite, read: typesToRead) We add all types in typesToWrite and typesToRead (old ones and new ones). HealthKit is smart enough to know that we have some new permissions to ask so it shows the HK Authorization screen. The first weird thing is that the HK auth screen shows some types a user has already allowed as not determined (the ones we have already asked users in the first app version). The main issue we are having is when user updates the app and we ask them for a HK authorization for new types, we got crash reports with message: Authorization for HKWorkoutTypeIdentifier should also be requested when requesting authorization to share HKWorkoutRouteTypeIdentifier From app logs we can see that write Workout and Workout route permissions were already allowed before. Also, it is not happening to all users, just to a small number of users. It's also strange because you just cannot enable workout routes without enabling workout permission in the HK auth dialog (it auto-enables workout if you want to enable workout routes). Does anyone know what might be the cause of this issue and how to fix it?
Posted Last updated
.