APNs will no register after unregistered

Comments

2 comments

  • Avatar
    Oleg Zhukov

    Hello,

    Actually, we can confirm such behaviour and it turns out it is not related to APNs directly, however the issue is still iOS-based.

    Let me explain. Basically as soon as you call unregister function, which in iOS will call:

    [[UIApplication sharedApplication] unregisterForRemoteNotifications];
    

    Push registration breaks and stops working completely. No matter what you do, the next registration:

    [[UIApplication sharedApplication] registerForRemoteNotifications];
    

    does not trigger ANY system callbacks. No success, no error, nothing. The iOS just ignores this call.

    We've found similar problem here:

    http://stackoverflow.com/questions/37950399/registerusernotificationsettings-not-work-after-using-unregisterforremotenotific/

    We would propose if you need to be able to unsubscribe users from push notifications, just create boolean Tag in Pushwoosh - "subscribed" and set it accordingly.

    It looks like this is a bug in iOS since we receiving the same issues across different plugins.

    Also Apple does not recommend calling this method at all.

    https://developer.apple.com/reference/uikit/uiapplication/1623093-unregisterforremotenotifications?language=objc

  • Avatar
    Mike

    Hi Oleg,

    Thanks for looking into it! For me, because everything is tag based I can just have it set the 'unsubscribe' to null on the tags.

    However, if it doesnt work for IOS maybe add it to the docs :)

    Thanks thought! I'm glad its not just me

Please sign in to leave a comment.