Hi, i searched everywhere and i really can’t find solution. In last few months push notification has changed a lot(ionic cloud, fcm…), and there is no any tutorial or docs or anything about implementing new push plugin. I tried to do how is described in ionic docs, found some info on stack overflow, ionic forum, github issue, but it not works.
First i had problems like google_app_id double resource build error, find somwhere to comment in push plugin config.xml line where is google_app_id, then I have problem with fcm, find that on forum too, and finally a done everything I found on net, send push notification, status is sent , but there is no push notification on phone. I was testing android, app open, closed everything and nothing.
So, please can someone write all steps, like push from scratch guide? I believe I’m not the only person who need this.
Thanks.
2 Likes
I’m seconding a request for this. I’ve completely exhausted myself trying to figure it out, and I feel like I must be overlooking some very simple step that’s either not mentioned or glossed over in the docs. Functional v1 and v2 test projects would be lifesavers!
I would like to hear some updates. If any…
I have (or at least had) push notifications working for Android without using ionic cloud. Here is the high level of the steps I took;
- Create an “Android app” within my Firebase project.
- Using cordova-plugin-fcm for handling push notifications on the client.
- Created a node server on Heroku using node-gcm node module to handle making sure the correct user(s) get the push notification.
The ios side has been like throwing darts blindfolded though.
On the Firebase slack channel I was told I didn’t need a “iOS App” because I’m working with ionic. That I could just use the Web setup. This doesn’t seem correct though since I needed an “Android App” in my Firebase project to get it working on Android.
Creating an “iOS App” on my Firebase project prompts me to integrate cocoapods to bring the Firebase pod into my application. But doing this causes ionic build ios
to fail on my command line build.
I added node-apn to the mix on my Heroku hosted node server and that seems to have broken things on the Android side also.
Would definitely be great to hear how others have accomplished this without relying on additional hosted services outside Firebase.
This is exactly why I completely avoid any of these intermediate platforms. There is no saying what changes and when. I directly use https://github.com/phonegap/phonegap-plugin-push and it works great for both APNS and GCM. My code is open source, so take a look if it helps. Push stuff starts here. For the push server, I use a hacked up version of AirNotifier
Thanks! I may dump cordova-plugin-fcm
for the phonegap-plugin-push
. The docs and support for the lib look more solid. Plus they have explicit instruction on working with cocoapods which I seem to need.