I finally have push notifications working with OneSignal! 🚀

KG.codes · 59 second read ·     
😅 Whew! I finally have iOS push notifications working on this app after a week of STRUGGLING with them. They just straight up wouldn’t work!

I use a free push notification provider called OneSignal for all my apps and their API must have updated because I couldn’t register devices anymore after years of doing it the same way.
Once I refactored the app to start registering devices using their SDK for Xamarin, instead of their REST API, it all just started working. 😫😅

Here’s how I completely implemented push notifications:
1. Signed up and created a new ‘app’ on OneSignal.com; got the app ID and API key
2. Used OneSignal’s tool to generate the Apple push notification service certs needed
3. Implemented the OneSignal SDK into the Xamarin app; this is for registering devices (i.e “Do you want to receive push notifications?” prompt)
4. Implemented API calls to OneSignal on the backend (PHP REST API) to send push notifications on certain user actions (i.e booking an appointment)
5. Tested successfully!

So happy to have these notifications working and be close to finishing this app!

⁉️ Anything you struggling on lately?



Want to share this?