freshplanet / ANE-Push-Notification

Air Native Extension (iOS and Android) for Push Notification
Apache License 2.0
205 stars 104 forks source link

PERMISSION_REFUSED_EVENT not triggered on iOS 6 AIR 3.5 #14

Closed melissayung closed 11 years ago

melissayung commented 11 years ago

Hi

I'm trying this ane on my iPod touch running iOS 6 with Air 3.5.

On first install of the app, if I click on "Don't allow" for push notifications, I am not getting the PERMISSION_REFUSED_EVENT triggered. So my app just hangs there.

When I go to my Settings->Notifications and play around with the Alert Styles (switching it from None to Alerts back to None). I relaunch my app, then I get the PERMISSION_GIVEN_WITH_TOKEN_EVENT event triggered.

Shouldn't it be the PERMISSION_REFUSED_EVENT triggering in both my scenarios above?

Thanks!

melissayung commented 11 years ago

Ok I think PERMISSION_REFUSED_EVENT might not be returned when user clicks "Don't allow".

I guess my question is, what should trigger my next flow then? There are no events being triggered after the user clicks "Don't allow" on the very first time the user uses the app.

From my testing (time consuming as I have to reset my iPod to factory settings everytime), it would seem that PERMISSION_GIVEN_WITH_TOKEN_EVENT does get triggered from the 2nd time the user launches the app (regardless of what kind of notifications the user has allowed/set for the app)

melissayung commented 11 years ago

I guess I can just load the app, and when if the token gets received, I push it to my server.