79439508

Date: 2025-02-14 13:26:43
Score: 2
Natty:
Report link

you're not setting device token to FCM system

func application(
          _ application: UIApplication,
          didRegisterForRemoteNotifeicationsWithDeviceToken deviceToken: Data
      ) {
          Messaging.messaging().apnsToken = deviceToken
          
      }

and in didFinishLaunching method

... 
        UNUserNotificationCenter.current().delegate = self
                let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]


         UNUserNotificationCenter.current().requestAuthorization(options: authOptions) { granted, error in
                    print("Notification permission granted: \(granted)")
                }
        
                
                Messaging.messaging().delegate = self
        
 ....

I'm always using in this order, I think it will work, please let me know after trying

edit:

and, the main problem in here is that

However, if you have disabled swizzling by setting
 *  `FirebaseAppDelegateProxyEnabled` to `NO` in your app's
 *  Info.plist, you should manually set the APNs token in your application
 *  delegate's `application(_:didRegisterForRemoteNotificationsWithDeviceToken:)`
 *  method.

As far as I get you touched your info.plist file to set FirebaseAppDelegateProxyEnable key to set it false, if you did it, you have to manually set it apnsToken like the code I've shared

Reasons:
  • RegEx Blacklisted phrase (2.5): please let me know
  • RegEx Blacklisted phrase (1): I think it will work, please
  • Long answer (-1):
  • Has code block (-0.5):
Posted by: eemmrrkk