Background fetch is not working after killing the app

后端 未结 2 438
栀梦
栀梦 2021-02-07 22:42

I\'m trying to get data from url with background fetch. My func tries to get data and if there is a new data, it sends local notification. Background fetch works after about 10

相关标签:
2条回答
  • 2021-02-07 23:06

    The Background Fetching will NOT happen in your app after the user has killed it in the multitasking UI. This is by design.

    Take a look at Apple's documentation that mentions:

    Apps that support background execution may be relaunched by the system to handle incoming events. If an app is terminated for any reason other than the user force quitting it, the system launches the app...

    and

    In most cases, the system does not relaunch apps after they are force quit by the user. One exception is location apps, which in iOS 8 and later are relaunched after being force quit by the user. In other cases, though, the user must launch the app explicitly or reboot the device before the app can be launched automatically into the background by the system.

    As you noticed in the documentation, there's only 1 exception when the app will be relaunched if it was force killed: by using location services. Unfortunately this does not apply to you.

    Also, you cannot detect if the app was force killed by the user. Check this StackOverflow answer.

    0 讨论(0)
  • 2021-02-07 23:08

    The Background Fetching will NOT Update in your app after the user has killed app from background. it is not Possible

    0 讨论(0)
提交回复
热议问题