Skip to content

Commit

Permalink
add health data authorization and remove notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
menahassan committed Jan 16, 2024
1 parent a5edc7d commit c4341df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 0 additions & 4 deletions Stronger/Onboarding/OnboardingFlow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ struct OnboardingFlow: View {
if HKHealthStore.isHealthDataAvailable() && !healthKitAuthorization {
HealthKitPermissions()
}

if !localNotificationAuthorization {
NotificationPermissions()
}
}
.task {
localNotificationAuthorization = await scheduler.localNotificationAuthorization
Expand Down
10 changes: 9 additions & 1 deletion Stronger/StrongerDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ class StrongerDelegate: SpeziAppDelegate {
private var healthKit: HealthKit {
HealthKit {
CollectSample(
HKQuantityType(.stepCount),
HKQuantityType(.appleExerciseTime),
deliverySetting: .anchorQuery(.afterAuthorizationAndApplicationWillLaunch)
)
CollectSample(
HKQuantityType(.dietaryProtein),
deliverySetting: .anchorQuery(.afterAuthorizationAndApplicationWillLaunch)
)
CollectSample(
HKWorkoutType.workoutType(),
deliverySetting: .anchorQuery(.afterAuthorizationAndApplicationWillLaunch)
)
}
Expand Down

0 comments on commit c4341df

Please sign in to comment.