sceneDidEnterBackground( and applicationDidEnterBackground( not getting called when the app is launched in the background

I have a location service running with background mode capabilities, and according to apple docs the app will call sceneDidEnterBackground() or applicationDidEnterBackground() if the app was launched in the background due to location event or if the app was suspended and received a location event. I am not witnessing this happening.

These methods are only called when the user moves away from the apps.

I am more concerned with the scenario where the app is suspended and gets move to background due to a location event as that is my only point of connection to execute code.

  • @MrWizardCoder, in addition to receiving (or lack of) didEnterBackground, you should also be getting delegate callbacks on your CLLocationManager. Are you getting those? Additionally, it sounds like you're just seeing issues when the app is in memory, not during launch, correct?

Add a Comment

Replies

Same issue / question here. I'm using HealthKit background observation mechanism (HKObserverQuery), the app is successfully launched from Not Running to Background state by the system, for some reason though the applicationDidEnterBackground method never gets fired.