I use push notifications in several of my client’s apps and they work great. A few tricks I’ve picked up along the way:
- Make sure you’re using a booelan column on the users profile table to store their “Request to allow push notifications” response. Also, make sure it’s an actual value saved with that user vs. making the column “user-specific”.
- Ensure that any of your actions that “Send” notifications are conditional to the signed-in user’s preference.
- If a user isn’t receiving notifications, there could be several factors affecting delivery. If user has signed in/out of different accounts on the installed app, or previously disabled notifications, then PN tend to fail. Here are the steps I’ve found to “restore” push notification functionality to any given user:
- Delete the installed app
- Clear browsing history
- If your “Request to allow push notifications ” action is conditional to only run when the user hasn’t allowed them yet, then make sure to clear that column (reset their settings).
- Re-install the app & sign back in.