GO FURTHER, FASTER: Try the Swift Career Accelerator today! >>

How to Upload HealthKit Data in the background?

Forums > Swift

Hello, I'm working on a project for which I need to use HealthKit background delivery. I've spent a few weeks on it but I cannot get it to work. I need my app to be able to "listen" for changes to the users HealthKit, and any time there is a change it should upload the HealthKit data to a database (AWS Storage) in the background. I have looked at sample code, and the documentation but I am stuck. When data is added to HealthKit, the changes are only made when the user comes back to the app, and not in the background.

There is more information and even all the code in this stack overflow post:

https://stackoverflow.com/questions/77328099/cannot-upload-healthkitdata-in-the-background

I would greatly appreciate any help because the entire project is stuck.

3      

Hacking with Swift is sponsored by Proxyman.

SPONSORED Debug 10x faster with Proxyman. Your ultimate tool to capture HTTPs requests/ responses, natively built for iPhone and macOS. You’d be surprised how much you can learn about any system by watching what it does over the network.

Try Now!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.