nickoneill/PermissionScope

Link "Show me" does not work on denied a permission

TomMajor opened this issue · 21 comments

I am surprised that I did not find this as an issue already filed or something in the readme file about it.

Anyway, if I click in the example app on "Show me" for a denied permission, it does jump to the general settings entry for this app (which is just blank), and not to Settings/Privacy/Contacts/AppName (as an example). This makes the link somehow useless and confusing for the user I think.

If the link can't be done right, I guess hiding the "Show me" would be better than jumping to the wrong place.
Thanks,

I haven't seen this issue @TomMajor, any denied settings show in the "general settings for this app" for me.

Can you be more specific about the system you're testing on and what permissions you're test with?

bre7 commented

The only link that you can set corresponds to "Settings/AppName". There used to be a way to link to specific settings (using the prefs:// URL scheme) but it doesn't work anymore and also I don't think it's allowed.

And I concur with .@nickoneill, any permissions that you have denied should appear in the app's settings unless they are disabled system wide.

iPhone 6 - iOS 8.4.1
I am testing your PermissionScope-example sample app, permission "contacts" for example.
The permission is denied in the settings.

Then I start your app - screen 1
I tap "Denied Contacts" and then "Show me" - screen 2
The app jumps to the general settings for this app - which is a blank page - screen 3
What should a user with limited knowledge on iOS settings do on this blank page? That is why I think this "Show me" link is rather confusing.

As I said, the right link would be Settings/Privacy/Contacts/AppName - screen 4
but this is not accomplished. I think this happens if the permission was denied from outside the app.

From what I researched since I discovered that yesterday, it may not possible to jump to Settings/Privacy/Contacts/AppName in iOS 8 at all.
But then, I think hiding a false link would be better than jumping to a confusing place in settings.
I hope you understand what I mean and can reproduce it.
Thanks for sharing your code.

Just to repeat for clarity, the last screen would be the right one to jump to, where the user can change the permission, but it is not reached.

screen shot 2015-08-21 at 18 51 29 png2 screen shot 2015-08-21 at 18 51 29 png2 screen shot 2015-08-21 at 18 51 29 png2 screen shot 2015-08-21 at 18 51 29 png2

bre7 commented

There seems to be a problem.

As I said, the right link would be Settings/Privacy/Contacts/AppName - screen 4
but this is not accomplished. I think this happens if the permission was denied from outside the app.

Read my earlier comment. As you stated, you can't open Settings/Privacy/Contacts/AppName only Settings/AppName.

If you install the app for the first time and says "Denied ..." and you haven't denied any permissions from the app itself or using Settings then there's a bug on the status detection.

Another user just approached me separately saying that Photos is always denied to them, even without requesting the permission. The coincidence makes me think there's a status detection bug somewhere.

Hello bre7,

yes, I have read your comment and this is also what I have found so far, you can't open Settings/Privacy/Contacts/AppName.

My point is the "Show me" link, do you see? It jumps just to the wrong place. What should the user accomplish on this blank page? It is just confusing.

@TomMajor Have you actively denied these permissions or do they just appear that way automatically?

What @bre7 is saying is that it jumps to the right place for some people. We both see settings for all these things listed on the page where "show me" takes you. The fact that it does not show up in that location for you and some other users is something we're trying to track down.

I have denied them actively for testing.

This happed in my app and confused the user later on (he could not remember that he did it or even the OS did it, or updates, I don't really know), so I was searching for solutions and found your project. But with the wrong "Show me" link, this will make the confusion of the user not easier (:

I have denied them actively for testing.

Ok, so a different issue from the other user who was seeing denied photos permissions automatically.

We'll look into why the app settings page appears differently for you than it does for others.

bre7 commented

I haven't been able to reproduce it.

@TomMajor could you try the swift2 branch just to be sure ? I've just tested it and the screen shows "Contacts" like it's supposed to.

yes, I could test the swift2 branch tomorrow. Will swift2 branch work on xcode 6.4?

Are you saying you don't get the blank page when you hit "Show me" on a (denied before) contact permission dialog? Could you please post a screenshot how that page looks on your machine?

bre7 commented

No, Swift 2 requires Xc7

screen shot 2015-08-21 at 18 51 29 png2 screen shot 2015-08-21 at 19 03 03 png2 screen shot 2015-08-21 at 19 03 09 png2 screen shot 2015-08-21 at 19 03 18 png2

@bre7 thanks for the screenshots, with that I could see how it is supposed to work.

I have done more tests with master branch, it is getting more confusing and the bug is more serious than I thought yesterday:

I noticed today, that I have all my app settings listed twice on my iPhone 6, like here:
https://discussions.apple.com/thread/6726557?start=0&tstart=0
This was not the case 2 days ago, so I suspected PermissionScope-example to have something to do with it.
I did a reboot as in the link recommended, and my app settings list appeared normal, only once :)

Then I opened xcode 6.4., build PermissionScope-example and let it run in debug mode on the real device.
I tapped contacts, denied it, tap Show me, the first time now there was actually the toggle on/off switch in settings page for this app, so far so good.
But then I double tap home button (task manager) go back to PermissionScope-example and the app hangs. I press home button, go to settings and all app settings are listed twice again! From now on, the link "Show me" just goes to the blank page, like before. More serious bug than that is that it somehow corrupts the app settings, because they appear twice.

Also, I got this in xcode:
2015-08-22 19:03:37.553 PermissionScope-example[194:3323] Presenting view controllers on detached view controllers is discouraged

Thanks for the testing @TomMajor. I'll do some more testing around this to see if I can reproduce any part of the problem.

However, I'm really hesitant to say that PermissionScope is the root cause of this problem, particularly because so far it only applies to your device. Any other peculiarities that we should know about your setup?

no, nothing special about my setup that I would know of, just a regular iPhone 6 with iOS 8.4.1, German localization, xcode 6.4, Mac OS 10.10.5, just loading PermissionScope project, select real iPhone device as target, go to Product->Scheme and change to PermissionScope-example, hit Run.

Somehow I think the bug is related to:
after first run, if I follow the "Show me" link, land in settings and then do the double tap and go back to the example app, this is the point where something goes wrong.

bre7 commented

Could you change the language to English and re-test ? Just to be sure.

@bre7 yes, will do that.

I could reproduce the PermissionScope-example hanging in Simulator (sometimes), but not the "duplication" of the app settings list.

I saw something strange on testing on the simulator, please see the screenshot. When I do the "Show me" link and change from there the permission from on to off or vice versa, sometimes xcode breaks, but not with a real crash, but with "signal SIGKILL". I asume this could be the point where on the real device the duplicate app settings weirdness is happening, but this is just a guess.

s1

bre7 commented

When I do the "Show me" link and change from there the permission from on to off or vice versa, sometimes xcode breaks

It's expected behavior since you just changed an app permission. The app is forced to restart I think.

@TomMajor
Run the APP without Xcode debugger, it works perfect

Hello nickoneill, bre7 and YKSing

sorry for the delay I was on vacation.

I can confirm now that this bug seems to be related to running with the debugger. Without the debugger, I can't produce the bug anymore. So everything seems to be fine now.

Thanks for a great framework.

Tom

Thanks for the follow up @TomMajor!