[Pushwoosh Plugin] RegisterDevice not working in iOS according to documentation. How I "fixed" it.
pushwoosh-plugin
Mobile icon
Forge component by Pushwoosh
Application Type
Mobile

Hello,

First of all, I couldn't change the post type to 'discussion', so I guess my question is: are my findings actually bugs, is the Pushwoosh documentation outdated or did I simply miss these details in the documentation?

It's my first time using this app and I spent almost two days trying to fix these issues, so I wanted to share my findings. I'm using version 4.6.1 (latest version as of writing this) and the issues only happen in iOS (because of course, ahah). I haven't tested other actions, so I don't know if it's just happening with RegisterDevice.


My findings:

  1. You need to include the PushwooshNotifications wb in the screen that calls the RegisterDevice action (haven't tested other actions). Applies to iOS only, Android doesn't seem to need it.

    In my case, I only want to send push notifications if the user is logged in so I didn't add the PushwooshNotifications wb to the login screen. I don't know if this is missing from the documentation, if I accidentally missed it or if it's a bug.

    I'm leaning towards bug because the RegisterNotification action didn't throw any exceptions, the screen action that called it just stopped. I don't get any error anywhere, neither in the app, while debugging nor in the console when remote debugging through Chrome. When I run the debugger in service studio and it reaches the RegisterDevice javascript, the arrow just disappears as if I'd restarted the debugger. I have 'break on all exceptions' enabled and nothing happens.

    Note: If you first navigate to a screen that has the PushwooshNotifications wb, then navigate to the screen that doesn't have the PushwooshNotifications wb and run the RegisterDevice action, it will work (I'm guessing because the wb loads some necessary scripts and they persist even after navigating to another screen).

  2. The documentation in Pushwoosh says you can leave the FCMSenderId input (PushwooshNotifications wb) blank if you're just using iOS and not Android. I found this to not be true at all, at least when using the RegisterDevice action.

    I created a separate app just for iOS and RegisterDevice didn't work. In this app I created a screen with the PushwooshNotifications wb and a screen action that calls RegisterDevice. I had to create a project in Firebase (in my case I created an Android project) and pass the SenderId value to the the PushwooshNotifications wb. Then RegisterDevice action started working.
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.