Hi,

I'm trying to find out how to get the status of the push notification on ios in Titanium. Basically I need to know if the remote push notification is enabled or not.

I think the native objC method it's `isRegisteredForRemoteNotifications`

Is there any way to get this?
I tried to call `getRemoteNotificationStatus` and `getPushToken`  (found them in the module's .a file :) )but they don't seem to be exposed to Titanium or they return undefined.

Thank you.
asked 30 Nov '15, 14:25
Dan%20Tamas's gravatar image

Dan Tamas
123

12next »

Hello Dan,

At the moment such functionality is not available yet. Please note that its implementation is being discussed by our development team, so it is expected to be released, however I cannot provide any ETA at the moment.

permanent link
answered 01 Dec '15, 11:25
Vitaly%20Romanychev's gravatar image

Vitaly Roman...
2213

One more note, if you accepted once, you need to fully delete the app on ios 9 and reinstall. On ios 8 is even worse (need to reboot the device few times, change the date, etc - search on google)

permanent link
answered 28 Jan '16, 16:47
Dan%20Tamas's gravatar image

Dan Tamas
123

Great job here, guys!

However this initially was a Titanium thread, so I would like to leave here a closing comment regarding this particular platform:

As Dan Tamas offered, you can use Titanium.Network.remoteNotificationsEnabled to find out whether a device have accepted or rejected receiving Push Notifications.

permanent link
answered 29 Jan '16, 10:54
Vitaly%20Romanychev's gravatar image

Vitaly Roman...
2213

Thank you for your reply.

I think this is something that shouldn't be too hard to do, I think there is already implemented in the native side of the SDK: https://github.com/Pushwoosh/pushwoosh-ios-sdk/blob/master/Documentation/PushNotificationsManager.md#getremotenotificationstatus

What I'm trying to build (and what I need it for) is a "smart" way of asking people to accept the push notification and in the same time try to get on board those that denied this in a previous version of the app. But for this I need to know what's the status of the PN.

Thank you.

permanent link
answered 01 Dec '15, 11:39
Dan%20Tamas's gravatar image

Dan Tamas
123

Hi, If anyone has trouble with this, I found out that Titanium's

Titanium.Network.remoteNotificationsEnabled

behaves correctly, so you can find out if the device has the permission to receive push notifications :)

permanent link
answered 08 Jan '16, 18:55
Dan%20Tamas's gravatar image

Dan Tamas
123

Would like this as well in the Cordova SDK if at all possible please.

Thanks

Rob

permanent link
answered 28 Jan '16, 15:10
rwillett's gravatar image

rwillett
2015

Can't you try to use the normal plugin for this? https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/API.md#pushnotificationhaspermissionsuccesshandler

PS. This is a guess for me, I don't use cordova :)

permanent link
answered 28 Jan '16, 15:44
Dan%20Tamas's gravatar image

Dan Tamas
123

Whoops thats embarrassing. Thought I knew the docs. Apologies

Rob

permanent link
answered 28 Jan '16, 15:46
rwillett's gravatar image

rwillett
2015

No reason to, let me know if it works, I'm curious :)

permanent link
answered 28 Jan '16, 15:48
Dan%20Tamas's gravatar image

Dan Tamas
123

Just checked the docs and they are for a different plugin, does the PushWoosh plugin follow that one? Or are you loading two in?

Rob

permanent link
answered 28 Jan '16, 15:49
rwillett's gravatar image

rwillett
2015

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:

×446
×353
×30

question asked: 30 Nov '15, 14:25

question was seen: 1,854 times

last updated: 29 Jan '16, 10:54