I use Firebase as a backend. I also use FCM as one of the provided features from Firebase. FCM worked well in iOS 10, but after switching to iOS 11, push notifications stopp
Seems to be an issue with Firebase SDK where push notifications stop working after app relaunch or when killed. A work around for this was suggested:
let deleteCount = UserDefaults.standard.integer(forKey: "oneTimeWorkaroundKey")
if deleteCount == 0 {
InstanceID.instanceID().deleteID { error in
if let cError = error {
log("APNS: Error on delete: \(cError)")
} else {
UserDefaults.standard.set(deleteCount + 1, forKey: "oneTimeWorkaroundKey")
}
}
}
Heres a link to see the discussions held about this, one case is still open trying to resolve this issue https://github.com/firebase/firebase-ios-sdk/issues/2438