-1

I'd like to send a message to a server from an iOS device at least a couple of times a day even if my app has been killed or terminated. I've been able to get this working in the background using react-native-background-task however when the app is killed the background-task no longer runs. I also tried using push notifications with Google Cloud Messaging. I was able to get silent notifications when the app was backgrounded but unable to do so when the app was killed.

Is there any way I can message a server from an iOS device from an app that has been killed/terminated? Any help is much appreciated.

Stefan
  • 211
  • 3
  • 14
  • If you're terminated you can't execute code. Period. That's a big part of how iOS forces us to be good citizens regarding power consumption and privacy. APNS will not relaunch you from a terminated state upon push receipt. A user must interact with the notification to bring you into the foreground. – Dare Jan 23 '18 at 18:49
  • Possible duplicate of [Will iOS launch my app into the background if it was force-quit by the user?](https://stackoverflow.com/questions/19068762/will-ios-launch-my-app-into-the-background-if-it-was-force-quit-by-the-user) – Dare Jan 23 '18 at 18:55

1 Answers1

2

"Is there any way I can message a server from an iOS device from an app that has been killed/terminated?"

No there is not, unless you're running on a jailbroken device.

Duncan C
  • 128,072
  • 22
  • 173
  • 272