I'm developing an app which has "Launch on startup" settings.
On MacOS Monterey, "Launch on startup" worked just fine.
On MacOS Ventura, on every laptop reboot "Login item added" pops up. Isn't it suppose to be just once? Is there a way to prevent the pop up appearance every reboot?
P.S. I also filed a bug report FB11625758
Post
Replies
Boosts
Views
Activity
How to read the physical Action button of the Apple Watch Ultra?
I found some partial info that will be a part of StarWorkoutIntent.
Does anyone have a working example of how to implement StartWorkoutIntent and integrate it into a fitness app?
hkLiveWorkoutBuilder.statistics(for: heartRate) vs HKAnchoredObjectQuery when developing workout app
I'm making a workout app for Apple Watch.
I start HKWorkoutSession, then associate it with HKLiveWorkoutBuilder and begin listening for heart rate and calorie changes.
I have 2 options on how to get a heart rate or calories:
Using HKLiveWorkoutBuilder statistics:
let heartRate = HKQuantityType.quantityType(forIdentifier: .heartRate),
let statistics = builder.statistics(for: heartRate){
let heartRateUnit = HKUnit.count().unitDivided(by: HKUnit.minute())
let value = statistics.mostRecentQuantity()?.doubleValue(for: heartRateUnit)
2. Executing HKAnchoredObjectQuery:
let heartRateSample = HKSampleType.quantityType(forIdentifier: HKQuantityTypeIdentifier.heartRate)
let heartRateUnit = HKUnit.count().unitDivided(by: HKUnit.minute())
let updateHandler: (HKAnchoredObjectQuery, [HKSample]?, [HKDeletedObject]?, HKQueryAnchor?, Error?) - () = {
query, newResult, deleted, newAnchor, error in
if let samples = newResult as? [HKQuantitySample] {
guard samples.count 0 else {
return
}
for sample in samples {
let value = sample.quantity.doubleValue(for: heartRateUnit)
value = Int(value)
}
}
}
heartRateQuery = HKAnchoredObjectQuery(type: heartRateSample!,
predicate: nil,
anchor: nil,
limit: Int(HKObjectQueryNoLimit),
resultsHandler: updateHandler)
heartRateQuery!.updateHandler = updateHandler
store?.execute(heartRateQuery!)
Which of the options is preferable?
Are there any benefits of using one over another?
Big thanks for all your responses!
I’m making WOD Insight - the Apple Watch app for CrossFit https://apps.apple.com/us/app/wod-insight-watch/id1495895643
The app helps crossfiters to track their progress during workouts. When they complete a set of push-ups, for example, they swipe on the watch screen, when they complete a set of squats, they swipe again, and so on.
It would be incredibly useful for my app if a set could be completed with a Digital Crown click instead of the screen swipe.
CrossFit is very competitive and saving these extra seconds on swipes is important for my users. Also, because CrossFitters working a lot with a barbell, the fingers get numb and not as sensitive to perform swipe on a tiny screen.
It would be big deal for the usability of WOD Insight app if Apple would allow handling Digital Crown clicks with future updates.
P.S. Gramin allows to do that, and this tiny detail prevents many of my users from switching to Apple Watch.
Thank you!