cordova-plugin-firebase doesn't work on iOS

Created on 19 Nov 2017  ·  13Comments  ·  Source: arnesson/cordova-plugin-firebase

Hello I'm using cordova-plugin-firebase , for android platform it works, but for iOS it doesn't. I followed all the steps of the following guide(https://medium.com/@felipeevangelistapucinelli/how-to-add-push-notifications-in-your-cordova-application-using-firebase-69fac067e821) in order to configure my app, but i've still problems. I tried to build my app using Xcode both in debug and release mode, but my app doesn't receive notifications.

Thank you in advance.

All 13 comments

same problem here. the plugin stopped working. doing
curl -X POST --header "Authorization: key=<yyy>" \ --Header "Content-Type: application/json" \ https://fcm.googleapis.com/fcm/send \ -d "{\"to\":\"<xxx>\",\"notification\":{\"body\":\"Yellow\"},\"priority\":10}"
gets:
{"multicast_id":...,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:..."}]}

notification doesn't ping the device. Any idea? Suggestion to try? etc? workaround? pls

@salvatoreferrigno did you fix it? if yes, how?

No, i didn't. I still have the same problem.

What might be? It was working just stopped after some updates (plugin,
cordova, xcode). It is in production. OMG!

Any ideia to figure out what's going?

Em 28/11/2017 16:57, "Salvatore Ferrigno" notifications@github.com
escreveu:

No, i didn't. I still have the same problem.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/arnesson/cordova-plugin-firebase/issues/483#issuecomment-347627451,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC_X1LxNfQMLsqENjYcBU6RPUDr1jeDUks5s7Fe2gaJpZM4QjN_W
.

It never worked for me, i tried to downgrade to the previous version of the plugin (18, 17, ..) but nothing. i don't know what might be the problem. how do you get it to work? which version of the plugin ?

@salvatoreferrigno I don't remember the version exactly, I'll look the history. After updates it stopped. I guess it's a plugin or xcode podfile issue.

The documentation says to add pod 'Firebase/Messaging' , before was just pod Firebase. But pod install fails when added Firebase/Messaging, so only Firebase/Core in my podfile.

The log says FCM connected. Not sure what's going on here.

@robertarnesson Does the plugin send ios push notifications to you ?

@salvatoreferrigno this is my last try. Add Firebase/Messaging to podfile. Try to make it work
platform :ios, '7.0' target 'XXX' do pod 'Fabric' pod 'Appsee' pod 'Crashlytics', '~> 3.9' pod 'Firebase/Core' pod 'Firebase/Messaging' end

returns

Analyzing dependencies Downloading dependencies Using Appsee (2.3.6) Using Crashlytics (3.9.3) Using Fabric (1.7.2) Installing Firebase 4.6.0 (was 4.6.0) Using FirebaseAnalytics (4.0.5) Using FirebaseCore (4.0.11) Using FirebaseInstanceID (2.0.6) Installing FirebaseMessaging (2.0.6) Installing GoogleToolboxForMac 2.1.3 (was 2.1.3) Installing Protobuf (3.5.0)

I got problems when try to run in XCode. Does it work for you ?

@salvatoreferrigno @robertarnesson make it working again. I'm gonna share step by step what I did. Would be nice have a troubleshooting to help others in the future.

Searching around I saw many suggestions to fix it but none of them really help me. It's what I did (when almost losing hope):

Try this troubleshooting

  • Close Xcode
  • Remove derivded data: rm -rf /Users/fausto/Library/Developer/Xcode/DerivedData
  • Clean pods (be in the right folder) : sudo gem install cocoapods-deintegrate cocoapods-clean ; pod deintegrate ; pod clean ;
  • readd plugin: cordova plugin rm cordova-plugin-firebase ; cordova plugin add cordova-plugin-firebase;
  • In Podfile add lines: pod 'Firebase/Core' and pod 'Firebase/Messaging' .
  • In Xcode in General remove libPods.a
  • Run pod install
  • cordova build ios
  • To solve duplicate symbols at build: In Xcode > Build Settings > Enable bitcode = TRUE
  • To solve no implementation push notification at send push: In Xcode in your -Info.list add/set FirebaseAppDelegateProxyEnabled = TRUE
  • Xcode clean
  • cordova build ios
  • Open Xcode try to run in your iphone
  • Send push via firebase console
  • I'm using auth key not certificate

pay attention to Xcode console, it shows some valuable information.

@salvatoreferrigno you can try, I can help you if you need any. We can improve this troubleshooting

Have a similar issue.. I am just trying to install the SDK and see some analytic in the firebase console.. However, noting is showing up for iOS.. I do see default events for Android..

Do I have to install cocoapods and create a podfile?. The plugin did not say it..

Thanks for your help

Any updates?I am facing the same error ?

closing as resolved

Was this page helpful?
0 / 5 - 0 ratings