2
votes

I have an iOS 10 app in which I am trying to set up support for Firebase notifications. However when sending messages through the Firebase Cloud Messaging console (targeting all iOS devices), the notifications do not appear on my device.

What I have done:

After sending the notification through the Firebase console, I can see that it has been sent to '0' devices.

Can anyone advise?

2
Have you put the .plist file available in firebase console, into the app project file?Mamta

2 Answers

1
votes

Fixed by adding FirebaseAppDelegateProxyEnabled and setting it to NO in the GoogleService-Info.plist file. Then modified AppDelegate.m to make use of the non-swizzled methods.

0
votes

Check following thing into your application code:

1) Check your certificate and bundle identifier in Firebase.

2) Make sure you send Device Token to Firebase.

- (void)application:(UIApplication *)application
   didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {

// For Development
    [FIRInstanceID instanceID] setAPNSToken:deviceToken type:FIRInstanceIDAPNSTokenTypeSandbox];

// For Production
    [FIRInstanceID instanceID] setAPNSToken:deviceToken type: FIRInstanceIDAPNSTokenTypeProd];

    }