Why my app in iOS 13 awake in background by silent push when terminated by user
Asked Answered
B

1

6

I don't know if it is a bug or feature by Apple. In the documentation:

system does not automatically launch your app if the user has force-quit it. In that situation, the user must relaunch your app or restart the device before the system attempts to launch your app automatically again.

As other StackOverflow questions are there this this showing the same.

In my case system relaunch the app in the background and run the code for storing in the database. How it can be possible? It call the method didFinishLaunchingWithOptions: then didReceiveRemoteNotification: in background (Not shown in app switcher). But in the earlier versions, it not awake the application in background tested in iOS 12.2

I am sending payload for notification

  "aps": {
    "alert": {
      "body": "",
      "title": ""
    },
    "mutable-content": 0,
    "category": "",
    "badge": "",
    "sound": "",
    "content-available": 1
  },
  "data": {
   //other fields
  }
 }


Borate answered 27/9, 2019 at 5:25 Comment(6)
Do you still face the app wake up even when it's killed in iOS 13.1? @suryakantsharmaJitters
yes. It wakes up in iOS 13.1 as well.Borate
@Borate I too am facing the same issue in iOS 13.6 as well, did you figure a way out.Vincenty
nope maybe you guys can upvote so someone can take a lookBorate
Apple forum discussion discussions.apple.com/thread/250682565Borate
@Jitters app wakes up in background in ios 15.5 also. can you help me ?Loiret
A
1

I'm using 13.3 and I can't replicate this. Trying hard to wake the app when it's force-quit by user but can't work at all. I even use 2 content_available and content-available in this FCM payload:

{
    "registration_ids": [
        "dX0-3Mmu9UIirh_ov4wJpl:APA9111112222233333jVRvrsvtoarX4zjtq1UjjaNtxPRL9UmXdV1l5DYMxJ86DTVxG9TDkqIEldEoRthisEfZQ5lOe8wY5ef2xoBtYv5rAM4CJizDblNh5qoZV2VvQxtoRRTIv1GiB"
    ],
    "priority": "high",
    "content_available": true,
    "content-available": 1,
    "data": {
        // other data
    }
}
Amido answered 16/12, 2020 at 8:30 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.