To set up firebase push notification, you can follow the below steps.
Steps:
- Navigate to firebase console
- Click Add App then choose android (steps are same for iOS)
- Fill All required details.
- App Name => Your App Name
- Package Name =>
com.yourcomanyname.appname
=> it should be the same insideconfig.xml
- SHA 1 key: https://developers.google.com/android/guides/client-auth
- Download
google-service.json
(for iOS downloadGoogleService-info.plist
) - Then copy your downloaded files & paste inside your project folder (not anywhere else)
Important
If you’re facing any error while building your app, you must remove the platform and add it again
ionic cordova rm android ionic cordova platform add [email protected]
If you didn’t received any notification, please make sure, plugin is added in your project using ionic cordova plugins
, if you’re not seeing cordova-plugin-firebasex
plugin, please execute below commands to add
ionic cordova plugin add cordova-plugin-firebasex ionic cordova platform rm android ionic cordova platfomr add android