capacitor-community / capacitor-community/privacy-screen

bug:

Open
#116 1 comment 0 reactions 0 assignees View on GitHub
bug/fix needs: triage platform: android platform: ios
Dominant language
Swift
Stars
103
Forks
25
PR merge metrics
No merged PRs in 30d

Description

**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

```

Contributor guide

Open the contributing guide

Research direction

Start with the related useEffect initialization and reproduce the white or grey screen on Android and iOS after returning from the Recent Apps screen. Compare behavior with @capacitor-community/privacy-screen enabled and removed, using the reported Capacitor versions. Done means the WebView content remains visible after backgrounding and returning to the app.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, ios, javascript, swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.