Skip to content
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

cordova-plugin-firebase doesn't work on iOS #483

Closed
salvatoreferrigno opened this issue Nov 19, 2017 · 13 comments
Closed

cordova-plugin-firebase doesn't work on iOS #483

salvatoreferrigno opened this issue Nov 19, 2017 · 13 comments

Comments

@salvatoreferrigno
Copy link

salvatoreferrigno commented Nov 19, 2017

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.

@faustoct1
Copy link

faustoct1 commented Nov 28, 2017

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

@faustoct1
Copy link

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

@salvatoreferrigno
Copy link
Author

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

@faustoct1
Copy link

faustoct1 commented Nov 28, 2017 via email

@salvatoreferrigno
Copy link
Author

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 ?

@faustoct1
Copy link

faustoct1 commented Nov 28, 2017

@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.

@faustoct1
Copy link

faustoct1 commented Nov 28, 2017

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

@faustoct1
Copy link

faustoct1 commented Nov 28, 2017

@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 ?

@faustoct1
Copy link

@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.

@faustoct1
Copy link

faustoct1 commented Nov 28, 2017

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

@premtemp1
Copy link

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

@furkankatman
Copy link

Any updates?I am facing the same error ?

@soumak77
Copy link
Contributor

closing as resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants