Posts

Post not yet marked as solved
0 Replies
44 Views
On android there is a way for my app to know when the device has been restarted or powered up after a restart or powering off. I wonder if there is a way to listen for the restart/power up even on the iphone and the Apple Watch?
Posted Last updated
.
Post not yet marked as solved
0 Replies
111 Views
I noticied that my workout session is sometimes being killed by apple when the app is in the background and it seems that the func workoutSession(_ workoutSession: HKWorkoutSession, didChangeTo toState: HKWorkoutSessionState, from fromState: HKWorkoutSessionState, date: Date) { is only being called when the app comes back into the foreground. I wonder if there is a way for us to get notified when the workout is about to die or has already been killed. Thanks
Posted Last updated
.
Post not yet marked as solved
1 Replies
538 Views
We have a watchos app that uses notifications to display time sensitive information to the users. We are using UNTimeIntervalNotificationTrigger(timeInterval: 1, repeats: false), our usernotification center looks like this func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { print("It got here to showing the notifications and this is when it is shown: \(Date()) and this is the type of notification: \(notification.request.identifier)") completionHandler([ .list, .sound, .banner ]) }. The problem is that the usernotification center is called correctly but no notification is given, every time 13 seconds later it is called twice again and only then does the notification display to the users. I have tried changing the type of trigger for the notification but even that did not get rid of the thirteen second delay.
Posted Last updated
.
Post not yet marked as solved
1 Replies
671 Views
We have a SwiftUI watch app that has the workout processing background mode. Every time our users raise their wrist the app opens. I understand that this is one of the abilities granted by Apple with the given background mode for active workouts. I wonder if there is a way for us to programmatically turn off this ability, given that this also drains the users battery. Thanks
Posted Last updated
.