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

How to Upload HealthKit Data in the Background?

Forums > iOS

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

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

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.