Post

Replies

Boosts

Views

Activity

How to delete Exercise minutes data from the activity ring?
I have followed the below function to delete the HKWorkout object, It is deleting Active Energy and Distance data but it is NOT deleting Excercise minute data, so the activity ring always displays Excercise minutes data even after deleting a particular workout entry. let predicate = HKQuery.predicateForSamples(withStart: workout.start, end: workout.end, options: .strictStartDate) let findQuery = HKSampleQuery(sampleType: deletedType, predicate: predicate, limit: 1, sortDescriptors: nil) { query, results, error in if results != nil { print("\nHere we got not nil on results!\n") for result in (results as? [HKWorkout])! { self.healthStore.delete(result) { [unowned self] (status, error) in if status == true { print("Successfully deleted HKWorkout.") } else { print("Error \(String(describing: error?.localizedDescription))") } } } } else { print("results are nil") return } } self.healthStore.execute(findQuery)
1
0
812
Jun ’21
Apple Watch not displaying my fitness app data on Exercise Minutes ring (Can we write “Exercise Minutes” to HealthKit?)
We have a Fitness app and we are writing fitness data to the Healthkit like Steps, Walking Running distance, and Active energy. and it is working as expected in the Health App. We also writing Workout data for Apple watch activity ring, we can see our data is reflected on the Apple Watch activity ring for Active Energy but not for Exercise Minutes. I've followed this document to - https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/adding_samples_to_a_workout create a workout sample for the Activity ring So my question is, is there a way by which the Apple Watch activity ring can display my app data(exercise duration) on the Exercise Minutes ring? For reference, I've attached a screenshot and highlighted the Excercise portion on the same. https://stackoverflow.com/questions/65323810/apple-watch-not-displaying-my-fitness-app-data-on-exercise-minutes-ring-can-we
1
0
557
Dec ’20
Sign in with Apple missing email claim in the (JWT) identityToken
We have implemented a sign in with Apple(SiwA) for our iOS app. for the signup we require the user's Apple id and email address. We are getting user name and email details on first login attempts but after that to get the email we are decoding identity token and get the email address.We observed that the identity token does not always contain the email address.Please follow the below steps to reproduce the issue.step 1: User clicks on Sign in with Apple button and it displays Apple authorization popup with details like name, share-email, and hide email option then in success response we get an email in received apple identity token.step 2: Now user revoke signing access from the apple account by following steps (Setting -> Apple account -> Password & Security -> Apple id logins -> remove the app from options)step 3: After step 2, User clicks again Sign in with the apple button and usually, it shows Authorization popup with details like step 1 and we got an email from the identity token in this case so we don't have any issue.step 4: After step 2, the user clicks on the sign in with the Apple button and authorization popup contains only email address instead of a name, share email, or hide email options. In this case, we didn't get an email from the identity token.The main problem is Authorization popup is not resetting after revoking access, it shows like previously logged-in state, and in this case, we don't get email otherwise we always get an email address from identity token.Can we debug/identify why Authorization popup is not resetting after revoked access?Any help would be appreciated.
15
2
22k
Apr ’20