Closed chekmari closed 1 month ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
What I'm experiencing is the following
after logout I delete the token on my server (register a push token with empty value) Then I apply the deleteData method.
In didReceiveRegistrationToken method updateFCMToken() is triggered in which Messaging.messaging().fcmToken is not deleted. Why?
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
print("DEBUG / PUSH NOTIFICATIONS / Firebase registration token: \(String(describing: fcmToken))")
appCoordinator.updateFCMToken()
}
updateFCMToken() {
/// Подписка на уведомления. Если прокинуты оба токена, звонки будут идти через VoIP пуши
registerForPushNotifications(voipToken: String?) -> Single<Void?> {
guard let fcmToken = Messaging.messaging().fcmToken else {
return .error(NSError.PushNotificationServiceError.fcmTokenMissing)
}
print("DEBUG / REGISTER WITH VOIP TOKEN \(String(describing: voipToken))")
return apiWrapper.registerPushToken(
pushToken: fcmToken,
voipToken: voipToken,
clientId: nil,
type: .fcmRepeating
)
}
}
AutoInitEnabled set to false FCM registration token successfully deleted AutoInitEnabled set to false FCM registration token: xxxxxxxxzeHdBjGZCi8qFlxjbYM3SxxxxphrgjHGCbFhNfS9mGxxxKeameiqP FCM registration token after logout: xxxxxxxxzeHdBjGZCi8qFlxjbYM3SxxxxphrgjHGCbFhNfS9mGxxxKeameiqP
Thanks for waiting, @chekmari. I tried to reproduce the issue, and looks like I was able to encounter the same behavior. To make sure that we're on the same page, could you confirm if the didReceiveRegistrationToken
method was being called and fcmToken
has a value even after triggering the Messaging.messaging().deleteData
?
Hey @chekmari. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@chekmari if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Description
Messaging.messaging().deleteData don't work
I do deleteData during a logout. My server sends a push after logout and firebase instead of giving an error to the server sends a push to the phone. Why is this happening.
`
`
Reproducing the issue
` input.logoutTrigger .drive( onNext: { [weak self] in let noAction = UIAlertAction(title: NSLocalizedString("No", comment: ""), style: .cancel, handler: nil)
`
Firebase SDK Version
10.24 and 10.23
Xcode Version
15.4
Installation Method
Swift Package Manager
Firebase Product(s)
Messaging
Targeted Platforms
iOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
Expand
Package.resolved
snippet```json Replace this line with the contents of your Package.resolved. ```
If using CocoaPods, the project's Podfile.lock