-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firebase Messaging: Fails to receive a notifications in iOS - SwiftUI #8738
Comments
I was able to fix this problem by disabling FCM method swizzling and handling methods myself. I found that it's because I am building a SwiftUI app like yourself that is the reason for the issue. For a full walkthrough, I used this guide which goes over setup with SwiftUI. |
@levibostian Your case might be different than @gabrielcosi since this bug is still using the AppDelegate lifecycle. Would you mind create a separate issue? Thank you! @gabrielcosi I am not able to reproduce since our sample app has the same setup. . Would you mind send me the debugLog or compare with our sample app to see if what's your setup might be different? |
[REQUIRED] Step 1: Describe your environment
Swift Package Manager
[REQUIRED] Step 2: Describe the problem
Device doesn't receive a notification with basic setup from firebase docs in SwiftUI. Already tested sending it directly via APNs and it works as expected.
Steps to reproduce:
What happened? How can we make the problem occur?
8.8.1 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at: https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging to ensure proper integration. Permission granted: true Notification settings: <UNNotificationSettings: 0x282741440; authorizationStatus: Authorized, notificationCenterSetting: Enabled, soundSetting: Enabled, badgeSetting: Enabled, lockScreenSetting: Enabled, carPlaySetting: NotSupported, announcementSetting: Disabled, criticalAlertSetting: NotSupported, timeSensitiveSetting: NotSupported, alertSetting: Enabled, scheduledDeliverySetting: Disabled, directMessagesSetting: NotSupported, alertStyle: Banner, groupingSetting: Default providesAppNotificationSettings: No> 8.8.1 - [Firebase/Messaging][I-FCM002022] APNS device token not set before retrieving FCM Token for Sender ID '807357529171'. Notifications to this FCM Token will not be delivered over APNS.Be sure to re-retrieve the FCM token once the APNS device token is set.
If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.
Relevant Code:
The text was updated successfully, but these errors were encountered: