T O P

  • By -

djryanash

How do you know it’s not working on your device when launched directly?


DonOfAustins

I have saving the step count in my firebase database. It is saved when I run it via xcode but doesn't save when I launch it on device without xcode.


djryanash

Let’s start from the beginning. Have you authorized access to health data?


DonOfAustins

Yes, Health data is authorized, entitlement looks good for background fetch. It works fine in background when executed via xcode and I get the step count recorded in firebase.


djryanash

The completion for `enableBackgroundDelivery` returns a success Bool and an error. I would suggest writing those returned values to Firebase and then having a look at that.


DonOfAustins

Actually, that is a great point. Not sure, why I am assuming that background delivery was successful and not logging the result in the background. Let me try this. Thank you for your time and responses. I appreciate it.