Skip to content

Commit f40496a

Browse files
committed
docs: add example gif
1 parent cd1d147 commit f40496a

File tree

1 file changed

+25
-16
lines changed

1 file changed

+25
-16
lines changed

README.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# react-native-secure-view
22

3-
A React Native component that protects specific content from screenshots and screen recordings on both iOS and Android.
3+
A React Native component that protects content from screenshots and screen recordings. On iOS, you can selectively protect specific components while keeping the rest of the screen visible. Android provides full-screen protection.
4+
5+
## Demo
6+
7+
| iOS | Android |
8+
| ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
9+
| ![iOS Example](https://github.com/user-attachments/assets/5605124b-625b-423d-a8e7-6edd635dd11a) | ![Android Example](https://github.com/user-attachments/assets/b66825bc-adcd-4fe0-a1c5-f2f1107eeec5) |
410

511
## Installation
612

@@ -58,32 +64,35 @@ function App() {
5864

5965
## How It Works
6066

61-
### Android
67+
### iOS
6268

63-
When `enable={true}`, the module applies `WindowManager.LayoutParams.FLAG_SECURE` to the activity window:
69+
Uses `UITextField` with `secureTextEntry` property to provide component-level protection:
6470

65-
- **Screenshots**: Completely blocked
66-
- **Screen recording**: Entire screen appears black during recording
67-
- Recent apps switcher shows a black screen
71+
- **Screenshots**: Only the `SecureView` component appears blank/hidden in the captured image
72+
- **Screen recording**: Only the `SecureView` component appears blank during recording (rest of the screen remains visible)
73+
- **Selective protection**: You can protect specific sensitive components while keeping other parts of your UI visible
74+
- Works by leveraging iOS's built-in secure text field behavior that hides content during capture
6875

69-
### iOS
76+
### Android
7077

71-
Uses `UITextField` with `secureTextEntry` property:
78+
Applies `WindowManager.LayoutParams.FLAG_SECURE` to the activity window:
7279

73-
- **Screenshots**: The `SecureView` component appears blank/hidden in the captured image
74-
- **Screen recording**: Only the `SecureView` component appears blank during recording (rest of the screen is visible)
75-
- Works by leveraging iOS's built-in secure text field behavior that hides content during capture
80+
- **Screenshots**: Completely blocked system-wide
81+
- **Screen recording**: Entire screen appears black during recording
82+
- **Recent apps switcher**: Shows a black screen instead of app content
83+
- **Full-screen protection**: When enabled, the entire app window becomes secure
7684

7785
## Limitations
7886

79-
### Android
87+
### iOS
8088

81-
- **Entire screen protection**: When enabled, the entire app screen becomes secure, not just the `SecureView` component
82-
- **Rooted devices**: May bypass protection on rooted/modified devices
89+
- **Component-level only**: Protection is limited to the specific `SecureView` component area, not the entire screen
8390

84-
### iOS
91+
### Android
8592

86-
- **Component-level protection**: Only hides the specific `SecureView` component, not the entire screen
93+
- **Full-screen only**: When enabled, the entire app screen becomes secure, not just the `SecureView` component
94+
- **Rooted devices**: Protection may be bypassed on rooted or modified devices
95+
- **System-level**: Applies to the entire activity window, affecting all content
8796

8897
## Contributing
8998

0 commit comments

Comments
 (0)