UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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 Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot 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.