Asking Pre-Permission on iOS
Join the DZone community and get the full member experience.Join For Free
When you open up a new app and a barrage of permissions dialogs pop up at you, doesn’t that just annoy you?
And when a user gets all bent out of shape when something doesn’t work, and it’s because they said no to those permissions in your app, doesn’t that just annoy you?
So yeah, we should all be telling the user exactly why we want a permission, so they’re less likely to say no; and we should be doing it only when we need to, instead of tossing everything at them on first run just to make absolutely sure their first impression of the app is that it sucks. Maybe you’re conscientious enough to have bothered doing that already. For the rest of us, there’s a good article to be reading here:
Over time, we’ve learned to ask our users for permission when, and only when, we absolutely need it and we think the user can clearly relate how this access will benefit them.
We’ve re-engineered Cluster using two methods to only show the system permissions dialog once a user has told us that they intend to say “Allow”…
As stated above, the worst possible thing is for a user to deny permission at the system level, because reversing that decision in iOS is very complicated. But if we ask them before the system does and they say no, we still have the opportunity to ask them again in the future when they are more likely to say yes.
For photos alone, 46% of people who denied access in a pre-permissions dialog ended up granting access when asked at a better time later.
This is simpler than you think…
The code described there can be found at clusterinc/ClusterPrePermissions for contacts and access.
And if you want a complete set, check out jlaws/JLPermissions:
An iOS pre-permissions utility that lets developers ask users on their own dialog for calendar, contacts, location, photos, reminders, twitter, and push notification access, before making the system-based permission request.
That cover everything you need permissions for these days? Hmmm … think microphone needs permissions too, recently. Almost a complete set then. No doubt microphone can be left as an exercise for the reader.
Published at DZone with permission of Alex Curylo, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.