If a "Minimum Deployment Target" is updated to WatchOS7 on a product(iOS app with a companion watch app) that is already available on the App Store, watches running WatchOS6 will obviously no longer get updates.
However, what is the experience for a user who has a WatchOS6 (maybe they own a Series 2) connected to an iPhone with iOS14?
Will both the iPhone app and the Watch app stop getting updates?
Will the Watch app stop getting updates, but the iPhone app continue receiving them and we have to manage this?
Something else?
Thanks in advance!
Use HealthKit to enable your iOS and watchOS apps to work with the Apple Health app.
Post
Replies
Boosts
Views
Activity
I've ran into an error with the insertRouteData function of the HKWorkoutRouteBuilder that I can't seem to find any information on. The error is "Unable to find location series 1A193D3B-AFF5-41D8-A967-B1BE08D9F543 during data insert.". It seems to only happen when trying to insert very long routes, in the most recent case it was a 5 hour bike ride with 5900 samples. I save all the route data in a sqlite table as backup and after checking out the data there isn't any red flags as to why it would not insert correctly. Has anyone seen this before and could offer some insight or point me in the right direction to find the source of the error?
I developed an iPhone/Watch app with the single target setting (new method) for Watch app projects, which will be available from Xcode14. This app uses HealthKit to retrieve information such as step count and heart rate from healthcare. The watch app is not independent and requires the iPhone app (companion app).
Regarding the permission to access health care, i found some differences from the Old WatchApp Project (application project structure using WatchExtension when Xcode 13.4 or lower is used).
This does not occur in the iPhone simulator or watch simulator, but only on the actual device.
Both the iPhone app and watch app now display a dialog to allow access to health care
In the Old WatchApp Project, if access was granted in either app, the granted access is synchronized.
When checking the Health Care access status in the iPhone Settings App, permission settings for both the iPhone app and watch app are displayed independently.
Because each permission setting is independent, you can choose to allow access to the iPhone app but not to allow it to the watch app.
the Old WatchApp Project, permission settings for the iPhone app and watch app were synchronized, so it was not possible to have different settings for each.
These behaviors are not described in the documentation.
It would be understandable if the transition from watch "extension" to watch "app" is to split the app into two separate units.
However, since there is no official documentation explaining this, i cannot determine whether this is the correct specification or not.
Furthermore, since the companion app is required rather than a separate Watch app, having the Health Care permission settings out of sync with the companion app could cause unexpected problems and worsen the user experience.
(It would be difficult and cumbersome for the user to know what settings they have made).
Is there a solution to synchronize this behavior with the companion app like as the Old WatchApp Project?
Do i have to go back to the project configuration (use of watchExtension) before Xcode13?
I have prepared a sample project below that can test the above.
https://github.com/HayakawaAKIRA/SingleTargetWatchOSApp-HealthKit
reference:
https://developer.apple.com/videos/play/wwdc2022/10133/
https://developer.apple.com/documentation/watchkit/wkapplication
https://developer.apple.com/documentation/healthkit/setting_up_healthkit
Is there way to read the Apple Heart rate zones from HealthKit? I want to read the min/max bpm for each of the 1-5 zones.
I went through the Apple HealthKit developer documentation but couldn't find it https://developer.apple.com/documentation/healthkit
I'm using the new watchOS 9 HKWorkoutActivity in my interval training app (Intervals Pro) for each interval. It's a great addition since all the intervals now show in the Apple Fitness app, however, if the workout has lots of activities then saving the workout is painfully slow. For example, on my Apple Watch Ultra I saved a workout with 63 activities and it took more than 1 minute. Here's a code snippet:
try await builder.endCollection(at: workoutEndDate)
try await builder.addMetadata(metadata)
try await builder.finishWorkout() // This is SLOW
Is anyone else having the same issue?
To demonstrate the issue you can look at a Test Flight build of Intervals Pro:
https://testflight.apple.com/join/Nn7iSOzY
Tap on the More tab in the iPhone app and then the Apple Watch Settings. On that screen you'll see a switch to either enable or disable workout activities. To demonstrate the issue, edit a timer to continue until manually stopped by changing the Number of Cycles to "Until Stopped". Then start the timer on the watch. Let it run for a period of time to create more than 50 intervals, for example, then stop the timer. Swipe to the leftmost screen on the watch, tap pause, then tap end. At that point you'll see how slow the workout saved.
Next, you can go back to the iPhone app, disable using workout activities and repeat the test. The workout will save quickly in this case.
I've filed a feedback.
Dear Apple Support Team,
I am reaching out to inquire about the process to enable the health-related features of the Apple Watch Series 8 in Pakistan. Your valuable guidance and assistance in making these features accessible would be greatly appreciated.
Thank you for your attention to this matter.
Sincerely,
Hello,
The new mental health features in iOS 17 allow users to log their momentary emotions and daily moods, see valuable insights, and easily access assessments and resources. Does anyone know if HealthKit in iOS 17 provides an API for accessing these records? Thanks :)
Hello,
I use iPhone 14 Pro with iOS 17 Beta, my girlfriend use iPhone 13 with newest iOS 16. We used to use Fitness application to share our daily activity (steps, kcals etc.) Unfortunately last time our activity progress doesn't shows properly. In my phone I have 1000 steps for example, my gf see 0 steps. The same was at I was on iOS 16. Removing and invitating again doesn't help. What can we check?
Thanks in advance :)
I noticed that there was the ECG app on the Apple Watch that enabled you to gather an ECG sample. Was there any method that could programmatically enable tracking within your own watchOS application? Currently, the only way I can physically get samples is if I leave the application I'm building to physically start an ECG session through the ECG app which is not ideal.
So almost every EPIC customer is now at a version that would allow their medical records to be imported, many of them just haven't filled out the Apple form to list their organization.
EPIC does publish a list of the FHIR endpoints for all of these customers though.
Functionally it should be possible to write an app that authenticates the user to their provider, and downloads the FHIR data from the API, and then pushes it into Apple Health.
The two things I'm not clear on though are:
Are the Medical Records available to write to from an app, or is it only available through organizations registered through Apple using their UI?
Would Apple consider this a replication of their functionality as far as App Store T's & C's go?
I am trying to get heart rate data from health store but when I make a query there are samples that come through with timestamps that shows that there are minutes that go by between the sample measurements. I remember watching an apple video where they were talking about the Quantity series and how these series have one kind of container for multiple data points of bpm data. I also see in the samples that there is a unit of " ___ counts per second" for each of the results so it would make sense if there were multiple datapoints within each of the results from the query but I don't know how to see what's inside of the results or if there is even anything more to them.
This is the code I am using to retrieve the data:
public func fetchLatestHeartRateSample(completion: @escaping (_ samples: [HKQuantitySample]?) -> Void) {
/// Create sample type for the heart rate
guard let sampleType = HKObjectType
.quantityType(forIdentifier: .heartRate) else {
completion(nil)
return
}
/// Predicate for specifying start and end dates for the query
let predicate = HKQuery
.predicateForSamples(
withStart: Date.distantPast,
end: Date(),
options: .strictEndDate)
/// Set sorting by date.
let sortDescriptor = NSSortDescriptor(
key: HKSampleSortIdentifierStartDate,
ascending: false)
/// Create the query
let query = HKSampleQuery(
sampleType: sampleType,
predicate: predicate,
limit: Int(HKObjectQueryNoLimit),
sortDescriptors: [sortDescriptor]) { ( _, results, error) in
guard error == nil else {
print("Error: \(error!.localizedDescription)")
return
}
print(results ?? "Error printing results.")
completion(results as? [HKQuantitySample])
}
healthStore.execute(query)
}
Ultimately I want the most frequent heart rate data that is available. Ideally a bpm measurement every 5 - 10 seconds or less. Is this possible if I have not explicitly saved this heart rate data to the health store for a user before trying to access it or does Apple store all of this information in the health store regardless of the circumstances?
Any help is greatly appreciated!
We have an app that reads data from the Apple Health Kit that is about 5 years old and we stopped receiving data from the app. While investigate why it quit working we are seeing some messages in the console log when we plug a phone into a mac that we are trying to get clarification on. We are seeing from the log:
healthd 'STARTING: com.apple.healthkit.background-delivery.:<thread?>'
followed by a:
dasd 'COMPLETED com.apple.healthkit.background-delivery.:<thread?> at priority 30
then a
dasd 'NO LONGER RUNNING com.apple.healthkit.background-delivery.:<thread?> ... Tasks running in the group [com.apple.dash.default] are 1!
I was looking for some clarification on what these messages mean. Do they mean that our app was started and that the process completed successfully or, is it a warning saying that something abnormal happened.
Also, I'm coming up short on documentation when I google for these messages. Is there a repository out there to help me make sense of what I'm seeing?
Thanks for any insight!
I have an iOS phone educational sports app. There is one small section where the user can track their stats. It is a very minor part of the app (perhaps 1% of the app content). It would be perfect for a watchOS app on its own. Can I create a separate standalone watch app even when the content is included in my phone app when it is a very insignificant part of the iPhone app?
Dear developers,
In case I want to start building healthcare marketplace app (pharmacies, medical equipments and labs) where every users can search for specific medicine, some Medical equipment and lab test can get a list of pharmacies, labs who provide those products/service. Having said that what could be the best sign in option for (pharmacists, labs, physicians, people/users) on phone number or E-mail or any sign in option that will fit who want to join healthcare app? I want your though guys here as I am trying to have a universal healthcare app that can connect all healthcare people/product/service with people.
Thanks in advance for any advice
I'm getting this errorBackgroundWorkoutSessionNotAllowed when calling session.prepare() on watchOS 10 Beta Simulator
The apple's doc doesn't have any information about this error https://developer.apple.com/documentation/healthkit/hkerror/4291533-errorbackgroundworkoutsessionnot
The code works perfectly on the device.
For some reason I am not receiving HKQuantityTypeIdentifierDistanceSwimming samples when using the watchOS 10 beta (8). The same code works fine on watchOS 9 but not on watchOS 10.
I have tried specifically enabling them in the collection types for the live builder and /or starting a query for them, but neither approach is causing any samples to be returned to the app.
Is this a known issue? Has something changed for swimming in watchOS 10?
Thanks in advance.
Hey team! I have a question that feels very obvious, but I cannot seem to find the answer in the documentation. Using HealthKit/WorkoutKit, how you can make workouts with different activity types? Say you do 10 minutes of traditionalStrengthTraining followed by 10 minutes of running (common for crossfit and similar high intensity workout styles)? From the docs, it looks like you can’t change the activity type on an HKWorkout and the new dividing workouts into activities concept seems to only be for swimBikeRun workouts. Do you simply make multiple consecutive HKWorkoutSession instances, e.g doing startActivity -> beginCollection -> endCollection multiple times?
Any input is highly appreciated!
Hi,
I'm the developer of Open Water Swim, and I have had multiple reports and have also confirmed with my own testing that the WatchOS 10 update has seriously degraded GPS data during open water swimming, both with the native Workout app and with Open Water Swim. The data provided by CoreLocation is no longer accurate or trustworthy. I will post several pictures showing before and after update swims:
Here's the raw data (mapped) of a swim done with watchOS 9 on the Ultra.
Same swim today:
From another pair of users: These two went TOGETHER, one with watchOS 9 and one with watchOS 10. You can probably guess which is which.
Watch OS 9 swim:
SAME SWIM WITH A PARTNER ON WATCHOS 10 (beta here)
And another, again, two people swimming together, one watchOS 9 and one watchOS 10.
watchOS 9
Same swim, same time, watchOS 10
I have filed two feedback assistant reports with APPLE. One when it was still a beta issue: FB12587468. This one has zero response from apple.
And now a second one filed with watchOS 10 release: FB13192409
Apple devs, I know you're here and listening, so please let's get this fixed ASAP. Thanks
Where are Apple Watch fitness goals stored in HealthKit?
I am working with Apple HealthKit, and I need to add functionality to my app that allows a user's Apple Watch to automatically send the relevant data for their workout session (e.g. vo2 max, start timestamp, end timestamp, heartbeat, duration etc) as soon as they end their workout. This would need to work for any type of workout they do.
E.g. if they are doing a running session, when they end their workout my app needs to receive the data for that running session almost instantly.
I know that enableBackgroundDelivery allows my app to listen to changes in Apple Health in the background, but I'm not sure which method in HealthKit will allow me to implement the above use case.
Does anyone have any pointers? I just want to know what methods in HealthKit will allow me to achieve this.