Post

Replies

Boosts

Views

Activity

Long workout does not end when done from watch without iPhone.
When the build a multi-device workout app sample project is ran, there is a problem that stops workouts from being logged with only the watch. When the workout is started from the Apple Watch with the iPhone app closed, you can usually end the workout from the watch in the first few seconds. However, if the workout lasts more than 30 seconds, when the workout is ended via the watch, everything will stall for multiple minutes or indefinitely until the iPhone app is opened. How is it reccommended to fix this issue? It makes the sample project unusable for production as is because many users may want to sometimes log a workout with their watch without the iPhone present. I haven't been able to figure out a good solution, can someone please help with this.
1
0
640
Oct ’23
How can Add Friend sheet be shown from SwiftUI?
The following page explains how to manually show the Add Friend Sheet for GameKit. However, in SwiftUI apps, UIViewControllers aren't used and I can't get the Add Friend sheet to work. What is the most simple way to show the presentFriendRequestCreator from a SwiftUI app? https://developer.apple.com/documentation/gamekit/connecting_players_with_their_friends_in_your_game?changes=_6 // Below is the code that shows how to present the add friend sheet, the problem is that I don't have a rootviewController to pass into the function as I'm using SwiftUI. do { try GKLocalPlayer.local.presentFriendRequestCreator(from: rootViewController!) } catch { print("Error: (error.localizedDescription).") }
0
0
1.2k
Sep ’22
Poor Performance of Sample code from "Counting human body action repetitions in a live video feed"
I downloaded the sample code from the WWDC 2022 session "Counting human body action repetitions in a live video feed" and ran it on my new iPhone SE (which has an A15 Bionic chip). Unfortunately, this sample project (whose action repetition counter was mentioned multiple times during WWDC, was extremely inconsistent in tracking reps. It rarely worked for me, which was disappointing because I was really excited about this functionality. I'd like to use this action repetition counting in an app of my own, it would be very useful if it worked, but I'm skeptical after struggling to get Apple's sample app to accurately count reps. Does anyone have any suggestions for getting this sample project or action repetition counting in general, to accurately work? Any help would be really appreciated, thanks!
2
1
2.2k
Jun ’22
How can Apple Watch App Action be ran by automation?
I would like to allow users to run an Apple Watch App action by using automations on the iPhone. The action can only be done on the watch and not the companion iPhone app? I noticed that it's possible to start a workout on the default Apple watch app with automations, and also possible to start a workout on the 3rd party Dawn Patrol app using automations. Is it possible to do this with custom intents or NSUserActivities or only the system start workout intent?
0
0
1.1k
Jan ’22
Setting up HealthKit on independent Apple Watch app
I am creating an independent Apple Watch app that is not linked to an iPhone app. How can I request access to HealthKit data directly from the Apple Watch without requesting the HealthKit data via an iPhone app.Apple recently announced that developers could now create independent Apple Watch apps in WWDC 2019, but I'm not finding documentation on how to use HealthKit on independent apps. I started following the instructions on this page herehttps://developer.apple.com/documentation/healthkit/setting_up_healthkitbut the problem that I'm running into is that I can't figure out how to set the necessary custom messages for NSHealthShareUsageDescription and NSHealthUpdateUsageDescription. Apples documentation says to do this through the Info.plist, but I can't find these options anywhere for the just the Apple Watch.Can anyone show how to use HealthKit for an independent Apple Watch app?
3
0
3.5k
Aug ’19