broadband
broadband

Reputation: 3498

How to display permission dialog for Camera after permission was denied in settings on iOS

I'm using next code to ask the user if he/she allows camera usage.

var cameraAllowed = await AVCaptureDevice.RequestAccessForMediaTypeAsync(AVMediaType.Video)
                           .ConfigureAwait(false);

It should show "Permission request" dialog every time (it works on Android).

Actual behaviour: Dialog is showed only the first time (clean install). Doesn't show "permission request" dialog again.

I have found that this is a limitation on iOS. Is there some other way to show permission dialog (some other code). Yes, I know I can redirect the user to settings page, but would like to achieve the same behaviour as in Android.

Furher more, where is this behaviour documented for iOS - RequestAccessForMediaTypeAsync

Forgot to mention, I'm using iOS 11 (11.1.1) to be exact.

Upvotes: 1

Views: 1565

Answers (2)

SushiHangover
SushiHangover

Reputation: 74209

The general consensus about requesting permission on iOS is to "pre-prompt" the user before allowing the OS' permission dialog to be displayed, from experience I now consider this a best practice.

The issue is once the user declines whatever permission you asked for, you are now in a position that the user has to change a setting outside of your app and typically in a non-captive audience-based app (i.e. the general public) app analytics that track the request for the user to manually opt-in to a permission via the OS' Setting panel have shown that over 90% of your audience will never complete that task.

There are a number of blog posts that show using A/B testing that if you pre-prompt the user with an app defined message/alert requesting that they grant access with a reason that they can relate to, that acceptance rate increases 2-fold, we also conducted bucket testing with a fairly large audience in a couple of apps and achieved almost a 2-fold increase.

enter image description here

If they decline, do not request the OS permission and allow the OS' permission dialog to appear, save the decline and ask again later. If they do accept the question, now request the OS permission and allow the OS permission dialog to appear.

A/B testing in our case showed a 72% acceptance rate of the first app-based dialog and then a 98% of the OS' permission dialog. While not pre-prompting, we got only a 40% acceptance rate of the OS' permission dialog and later requesting those users that declined the permission to manually change the setting to access that feature of our app, we got less than a 8% conversion. Of course we tend to lose almost the entire app audience that have declined the permission request(s) as typically those features have a high importance to the usability of the app and the reason a typical user will keep returning to the app.

I have read that Uber achieves ~80% on the user opt'ing in for push notifications using this technique. Various gaming companies and app agencies have posted similar conversion rates...

Upvotes: 2

Nick Kovalsky
Nick Kovalsky

Reputation: 6502

Why not present your own dialog, then navigate to iOS system app setting to turn permissions On if user chooses to do so.

Upvotes: 0

Related Questions