OneSignal / OneSignal-Xamarin-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Xamarin app with OneSignal. https://onesignal.com
Other
105 stars 50 forks source link

iOS: get whether user allowed push notifications or not #66

Closed MihaMarkic closed 5 years ago

MihaMarkic commented 6 years ago

Is there a way to wait for user to allow push notifications or deny? Right now the dialog seems async after EndInti();

jkasten2 commented 6 years ago

@MihaMarkic There currently isn't a callback / async method for when permission prompt is answered. However you can use IdsAvailable to know when device is registered after they answer the prompt. userID will be non-null when the device registers with OneSignal and pushToken will be non-null if the devices successfully registered with APNs and your app has notification permissions.

The OneSignal native iOS SDK does have a callback for the permission prompt response itself, we will be hooking this up in the future to the Xamarin SDK.

MihaMarkic commented 6 years ago

Please, add that. IdsAvailable is not the same as there might be other causes, I guess (i.e. no internet connected). When exactly do I get IdsAvailable callback?

rgomezp commented 5 years ago

Closing. Issue still internally under consideration