TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

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 Superwall.

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

Learn More

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.