2
votes

we are trying to implement push notification on Android and iOS app, we are using Firebase Cloud Messaging to send push notification to our app.

actually my iOS app can connect to the Firebase Cloud Messaging, If I send the notification through firebase console notification, I can receive the notification in my app enter image description here

but if the message is sent through our backend server (PHP), I will not receive the notification in my iOS app, but that message will be arrived in our Android App.

we are still trying to figure out the problem, either it is from client side or from server side. but from the backend server, it send a response error

Invalid (legacy) Server-key delivered or Sender is not authorized to perform request.

but I also have to ensure that the problem doesn't come from my iOS app. but I also have a doubt, because in my debugging area, it show a message

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.

in info.plist i set the value of FirebaseAppDelegateProxyEnabled to YES

enter image description here

if I set this to NO as per the message from debugging area like above , then I will not receive the push notification, thats why I set that to YES.

To be honest I completely have no idea what the purpose of that FirebaseAppDelegateProxyEnabled

what is the function FirebaseAppDelegateProxyEnabled ?, is that the root cause of the problem on my client side app?

2

2 Answers

0
votes

Try use the new api key, not the legacy one. Got the same issue, when I change the key, the push notification is received in iOS client

0
votes

Make sure both iOS and Android are registered on same Firebase application. In that case, your Server key on Firebase application will be the same for both iOS and Android. I think you are using different keys.

Got my point?