iOS, Objective-C, Swift, Design and Whatever Comes in Mind
‹ Back to the Blog

Open-Source Project: PermissionController

In my recent post I wrote the right way about asking the user for permissions.
Please take a look at it if you are interested in this topic.

Now, I’d like to present to you: PermissionController

Screencast showing an iPhone with the PermissionController

It fulfills every mentioned point:

Never popping up the question before the user is ready to answer it with „yes“
Present the proposal just in time when the user wants to do an action
Continue this action after the permission was granted.
Avoiding rejection on system level because the users decision has been made before he actively opens the system dialog.

The concept is simple:

  1. You tell the user, why the app needs his permission.

  2. The user decides, what permission he is willing to grant.

  3. The PermissionController triggers the system dialog.

All you as a developer need to do is call
presentPermissionViewIfNeededInViewController(viewController: UIViewController, interestedInPermission: PermissionInterestedIn?, successBlock: (()->())?, failureBlock: (()->())? )
on an instance of PermissionController.

You can provide a closure of code, that will be executed after the user dismisses the PermissionController. Depending on what you were interested in (interestedInPermission), the successBlock or failureBlock will be executed.
That is the place, where your app should, lets say, use the users location.




This project could save you a few hours building a solid an decent way to ask.
It provides interfaces for you app to hook in and is a delightful optical presentation.

In my tests, the shown concept of asking for permissions is the one with the most positive outcome.

Always remember: you are (more or less) depending on the user to answer the system dialog with yes and therefore you should go the extra mile to make sure that you will get as many yes as possible.

"Open-Source Project: PermissionController".