Im using pushwoosh with trigger.io and am experiencing an issue with re-registering a device. Basically when a device is 'unregistered' it works as expected, they don't get push notifications but if they 're-register' it does not allow them to register again, no errors are thrown, its just does not register them.

I have put in a work around that basically just removes the tags but for all users who have 'unregistered' their device, they cannot 'regegister' the device unless they re-install the app.

asked 07 Feb, 14:36
proxim0's gravatar image

proxim0
111

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

permanent link
answered 10 Feb, 09:00
Oleg%20Zhukov's gravatar image

Oleg Zhukov
2174

edited 10 Feb, 09:08

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

permanent link
answered 10 Feb, 14:54
proxim0's gravatar image

proxim0
111

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×432
×344
×12

question asked: 07 Feb, 14:36

question was seen: 801 times

last updated: 10 Feb, 14:54