Closed beck24 closed 7 years ago
Hi,
This seems to be out of our control. Please refer to https://github.com/Pushwoosh/pushwoosh-unity/issues/18#issuecomment-255489907 for additional details and a possible workaround.
Hi,
As mentioned above unregisterForRemoteNotifications is broken on iOS10. To implement opt-in/out strategy simply create a tag "optin", set this tag when user opts-in for push notifications (or set it to null
(unset) for opt-out) and then send push using this the filter with tag.
I hope this helps.
[edit] - original plugin version 6.2.2, upgraded to 6.4.0 and still experiencing the same issue
I have a simple interface for toggling notifications on/off. When off it calls unRegisterDevice() and when on it calls registerDevice()
At some point recently the registerDevice() function stopped working for repeated calls. When the app first loads, if the saved state (or default state) is to allow notifications, then the registerDevice() function works the first time. It registers the device properly, and my success callback is triggered. I also have an error callback in place, presumably that is called in case of an error.
Now when notifications are turned off unRegisterDevice() is called, and the callback is triggered.
If you want to turn notifications on, registerDevice() is called again but neither the success nor the error callbacks are triggered and the device is not registered to receive notifications.
For reference here is the function that toggles notifications on (with a bunch of debugging code in it)
When the device loads the console log shows as it should, with:
properly being logged.
When notifications are toggled off, and then on the console log looks like this:![screen shot 2016-12-11 at 6 23 35 pm](https://cloud.githubusercontent.com/assets/738363/21086280/f08ff4d6-bfcf-11e6-8a5a-5195188950a0.png)
As you can see my function is called, but there is nothing logged for the registerDevice() callbacks. I logged the window.plugins.pushNotification object just to make sure it was what I expect it to be and it appears to be the pushwoosh plugin and lists the registerDevice prototype function. I'm at a loss to explain this but I really need a solution.