Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functionality to enable or disable the PrivacyScreen #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nick-adriaenssens
Copy link

Default value is true but can be changed with a config preference.

Use case example: disable the PrivacyScreen when the native Touch ID popup opens.

@jonathanli2
Copy link

Hi,
I got the same issue when touch id screen shows, the UI background shows the privacy screen image. However, it seems the issue should be fixed by changing the below code from

  • (void)pluginInitialize
    {
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidBecomeActive:)
    name:UIApplicationDidBecomeActiveNotification object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillResignActive:)
    name:UIApplicationWillResignActiveNotification object:nil];
    }

to

  • (void)pluginInitialize
    {
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidBecomeActive:)
    name: UIApplicationWillEnterForegroundNotification object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillResignActive:)
    name: UIApplicationDidEnterBackgroundNotification object:nil];
    }

The reason is once the touch is dialog is shown, if the app really goes into background, then it still need to replace the current screen with privacy screen. If we call the new property to disable the privacy screen, then the privacy screen will not work as expected in this case.

This also follows Apple UI design, as even if app is not active, as long as it is still the foreground app, (for example, when a notification comes or a phone call is coming), then we should not hide the screen with the privacy image.

I will submit a new pull request for ios client for this issue using the above change.

Thanks
Jonathan

@rikenppatel
Copy link

Hello @jonathanli2 ,

I tried your fix for TouchID privacy screen issue. But it disable whole privacy screen plugin, not only touch id pop up splash screen. Please help !

@jonathanli2
Copy link

Hi,
Just tested the change on both ipad2 simulator and iphone 5s device, and it works as expected.
I shared the iphone screen recording at

https://youtu.be/1D_BI5n6vEY

The testing project only has a statusbar plugin and privacyscreen plugin.

Note during the recorded testing I first clicked the home button to verify the privacy screen function. Then the second time I double clicked the home button, since at that time, the app still did not enter background, so the privacyscreen will not show, but once another app or home screen was selected to become active app, then the testing app will enter background, and the privacy screen would apply.

If you still get problem in your testing, could you share the prototype project or a screen recording so that I can follow it to repeat the issue?

Thanks
Jonathan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants