Post

Replies

Boosts

Views

Activity

Reply to How to use vibe tools in Xcode
Hi @DTS Engineer , I have the same need as @gbuilds and watch the referenced video but I can't find the Intelligence tab in the Xcode settings pane. I've installed Xcode 26.0 beta (17A5241e) on Mac OS 15.5 (24F74) from France. Is there any specific configuration to set-up on the Mac or elsewhere to get the Intelligence tab activated ? Thank you and have a nice day. EDIT: Seems like Mac OS 26 is required: ( see https://developer.apple.com/forums/thread/787200?answerId=842389022#842389022 )
Jun ’25
Reply to How to save a workout with a route on a locked iPhone ?
I though that the code above was working (I did a quick test), but after this morning run, the workout saving failed... When this code is executed on a locked iPhone I get the following log: Whereas when saving from an unlocked iPhone I get : It seems that the healthStore.save(hkworkout) method do not really save the workout when the iPhone is locked :-( I will try to manually add the locations to the workout without using the HKWorkoutRouteBuilder... @HealthKit team, any tip on how to save a workout with a route on a locked iPhone ?
Dec ’21
Reply to How to save a workout with a route on a locked iPhone ?
I think I finally have found a way to save a workout with a route even when the iPhone is locked. TLDR: We should create the workout ourselves and not use a HKWorkoutBuilder. I use the following code: let healthStore = HKHealthStore() let energyBurned = HKQuantity(unit: HKUnit.kilocalorie(), doubleValue: totalEnergyBurned) let distance = HKQuantity(unit: HKUnit.meter(), doubleValue: workout.distance) let hkworkout = HKWorkout(activityType: .running,                           start: workout.start,                           end: workout.end,                           duration: workout.duration,                           totalEnergyBurned: energyBurned,                           totalDistance: distance,                           metadata: nil) try await healthStore.save(hkworkout) let route = HKWorkoutRouteBuilder(healthStore: healthStore, device: .local()) try await route.insertRouteData(locations) try await route.finishRoute(with: hkworkout, metadata: nil) The tip is to directly create the workout as the HKWorkoutBuilder.finishWorkout() would return nil on a locked iPhone (why?) and then use a HKWorkoutRouteBuilder and call finishRoute() with the created workout. Hope it will help others.
Dec ’21
Reply to How to use vibe tools in Xcode
Hi @DTS Engineer , I have the same need as @gbuilds and watch the referenced video but I can't find the Intelligence tab in the Xcode settings pane. I've installed Xcode 26.0 beta (17A5241e) on Mac OS 15.5 (24F74) from France. Is there any specific configuration to set-up on the Mac or elsewhere to get the Intelligence tab activated ? Thank you and have a nice day. EDIT: Seems like Mac OS 26 is required: ( see https://developer.apple.com/forums/thread/787200?answerId=842389022#842389022 )
Replies
Boosts
Views
Activity
Jun ’25
Reply to Xcode 13 "Missing package product" using local Swift Packages
Thank you. Removing and adding the local packages again also fixed my issue with XCode 14.3.1.
Replies
Boosts
Views
Activity
Aug ’23
Reply to How to save a workout with a route on a locked iPhone ?
I though that the code above was working (I did a quick test), but after this morning run, the workout saving failed... When this code is executed on a locked iPhone I get the following log: Whereas when saving from an unlocked iPhone I get : It seems that the healthStore.save(hkworkout) method do not really save the workout when the iPhone is locked :-( I will try to manually add the locations to the workout without using the HKWorkoutRouteBuilder... @HealthKit team, any tip on how to save a workout with a route on a locked iPhone ?
Replies
Boosts
Views
Activity
Dec ’21
Reply to How to save a workout with a route on a locked iPhone ?
I think I finally have found a way to save a workout with a route even when the iPhone is locked. TLDR: We should create the workout ourselves and not use a HKWorkoutBuilder. I use the following code: let healthStore = HKHealthStore() let energyBurned = HKQuantity(unit: HKUnit.kilocalorie(), doubleValue: totalEnergyBurned) let distance = HKQuantity(unit: HKUnit.meter(), doubleValue: workout.distance) let hkworkout = HKWorkout(activityType: .running,                           start: workout.start,                           end: workout.end,                           duration: workout.duration,                           totalEnergyBurned: energyBurned,                           totalDistance: distance,                           metadata: nil) try await healthStore.save(hkworkout) let route = HKWorkoutRouteBuilder(healthStore: healthStore, device: .local()) try await route.insertRouteData(locations) try await route.finishRoute(with: hkworkout, metadata: nil) The tip is to directly create the workout as the HKWorkoutBuilder.finishWorkout() would return nil on a locked iPhone (why?) and then use a HKWorkoutRouteBuilder and call finishRoute() with the created workout. Hope it will help others.
Replies
Boosts
Views
Activity
Dec ’21