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

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:


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


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.