Change when SDK requests permissions for Push Notification

In our app we have a custom dialog that shows before the OS requests permissions for Push Notifications. I see that once UrbanAirship has been added, it requests these permissions on start up. 


Is there a way that we can choose when the SDK requests these permissions?

Didn't find what you were looking for?

New post



  • Hi Stewart,

    Firstly, I'm making an assumption that you are talking about iOS specifically here, let me know if this isn't the case. 

    The permission for allowing Push Notifications is requested when the app tries to enable notifications for the user. This is done using the following call:

    UAirship.push().userPushNotificationsEnabled = true

    This code can be ran whenever you choose, allowing for you to display your custom dialog beforehand. 

    I hope that makes sense, please let me know if you need any more detail on it.

    Comment actions Permalink
  • Thanks for the reply Aidan, 

    You are correct in correct in your assumption. Unfortunately your suggestion doesnt work for me. I place that call in when I would normally try to register for push notifications and yet I still get prompted when the app launches.

    Comment actions Permalink

Please sign in to leave a comment.