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?
Post
Replies
Boosts
Views
Activity
I have a complication that works perfectly in the simulator, but won't run on a device. I'm perplexed about why this is happening. Does anyone have any ideas why this could be occuring?
I used the iOS app with Watch app Xcode template and plan to eventually release both an iOS app and Apple Watch app. The Apple Watch app is simpler so I'd like to release just the watch app on the App Store initially.
Is it possible to just release the Watch app portion of an Xcode project to the App Store?
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?
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!
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).")
}
Is there any way a live activity could be started from a shortcut? The example live activities (ordering a ride share, viewing sports scores etc) are good fits for shortcuts and live activities but I'm not able to start a live activity from a shortcut using the new app intents framework.
Is it possible to start a live activity from an app intent shortcut?
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.