privacy-screen icon indicating copy to clipboard operation
privacy-screen copied to clipboard

bug:

Open neajenZ opened this issue 7 months ago • 1 comments

Plugin version: 5.2.1

Platform(s): android/ios

Current behavior: When using @capacitor-community/privacy-screen, the app sometimes displays a white or grey screen after returning from the Recent Apps screen (task switcher), both on Android and iOS. The issue does not occur when the plugin is removed.

Expected behavior: not display grey screen

Steps to reproduce:

Launch the app with the privacy-screen plugin enabled.

Background the app (via Home or switch to another app).

Return to the app from the recent tasks list.

❌ The screen stays white/grey, and the WebView content is invisible.

Repeating step 3 sometimes restores the view.

Related code:

 useEffect(() => {
        if (!Capacitor.isNativePlatform()) return;

        const init = async () => {
            const result = await getPrivacyScreenValue();

            setPrivacyScreenEnabled(result);

            if (result) {
                await PrivacyScreen.enable();
            } else {
                await PrivacyScreen.disable();
            }
        };

        init();
    }, []);

Other information:

Capacitor doctor:

Latest Dependencies:

  @capacitor/cli: 7.2.0
  @capacitor/core: 7.2.0
  @capacitor/android: 7.2.0
  @capacitor/ios: 7.2.0

Installed Dependencies:

  @capacitor/cli: 6.2.0
  @capacitor/core: 6.2.0
  @capacitor/android: 6.1.2
  @capacitor/ios: 6.1.2

[success] Android looking great! 👌
[error] Xcode is not installed

neajenZ avatar May 30 '25 07:05 neajenZ

Thank you for reporting that. Feel free to create a PR.

robingenz avatar May 30 '25 11:05 robingenz