I am not aware of any way that you can circumvent the UIAlertViews
presented by Apple that ask the user for permissions. What you can do however is this:
- Present a view explaining in greater detail why you need the specific permission. With two buttons as Shazam does. And tell the user the user that tapping OK will present an alert to confirm.
- If user taps ok, trigger some action (e.g. location) that requires the user's permission or use the system provided way of asking for permission (e.g. mic).
- If the user taps "don't allow" you can still in the future present the interface again. With more explanation.
This approach is better than to always use the system's permission dialogue right away, as this can usually only be denied once from within the app. Using a custom view before the alert view allows you to ask more often.
We have also published a framework to help you with that: https://github.com/iosphere/ISHPermissionKit