Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kayla-tech/react-native-privacy-snapshot
Obscure passwords and other sensitive personal information when a react-native app transitions to the background
https://github.com/kayla-tech/react-native-privacy-snapshot
Last synced: 6 days ago
JSON representation
Obscure passwords and other sensitive personal information when a react-native app transitions to the background
- Host: GitHub
- URL: https://github.com/kayla-tech/react-native-privacy-snapshot
- Owner: kayla-tech
- Created: 2015-10-07T03:59:00.000Z (about 9 years ago)
- Default Branch: develop
- Last Pushed: 2020-03-31T22:26:30.000Z (over 4 years ago)
- Last Synced: 2024-08-16T16:51:05.186Z (4 months ago)
- Language: Objective-C
- Size: 267 KB
- Stars: 182
- Watchers: 13
- Forks: 51
- Open Issues: 9
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-react-native - react-native-privacy-snapshot ★133 - Obscure passwords and other sensitive personal information when a react-native app transitions to the background (Components / UI)
- awesome-react-native-native-modules - react-native-privacy-snapshot ★102 - native app transitions to the background. (<a name="Security-&-Auth:-Native-Modules">Security & Auth: Native Modules</a>)
- awesome-reactnative-ui - react-native-privacy-snapshot - native app transitions to the background|<ul><li>Last updated : This week</li><li>Stars : 146</li><li>Open issues : 7</li></ul>|![]()| (Others)
- awesome-react-native - react-native-privacy-snapshot ★133 - Obscure passwords and other sensitive personal information when a react-native app transitions to the background (Components / UI)
- awesome-reactnative-ui - react-native-privacy-snapshot - native app transitions to the background|<ul><li>Last updated : This week</li><li>Stars : 146</li><li>Open issues : 7</li></ul>|![]()| (Others)
- awesome-react-native - react-native-privacy-snapshot ★133 - Obscure passwords and other sensitive personal information when a react-native app transitions to the background (Components / UI)
- awesome-react-native-ui - react-native-privacy-snapshot ★57 - Obscure passwords and other sensitive personal information when a react-native app transitions to the background (Components / UI)
- awesome-react-native - react-native-privacy-snapshot ★133 - Obscure passwords and other sensitive personal information when a react-native app transitions to the background (Components / UI)
README
# Enable privacy snapshot for React Native
In the [App Programming Guide for iOS](https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH4-SW8), Apple says:
> When an app transitions to the background, the system takes a snapshot of the app’s main window, which it then presents briefly when transitioning your app back to the foreground. Before returning from your `applicationDidEnterBackground:` method, you should hide or obscure passwords and other sensitive personal information that might be captured as part of the snapshot.
This react-native module obscure passwords and other sensitive personal information when an app transitions to the background.
### `PrivacySnapshot.enabled(false)`
![Screenshot of the multi-tasking screen](screenshot1.png)
### `PrivacySnapshot.enabled(true)`
![Screenshot of the multi-tasking screen with privacy screenshot](screenshot2.png)
## Installation iOS
1. Run `npm install react-native-privacy-snapshot --save` in your project directory
1. Open your project in XCode, right click on `Libraries` and click `Add Files to "Your Project Name"`
1. Within `node_modules`, find `react-native-privacy-snapshot` and add RCTPrivacySnapshot.xcodeproj to your project.
1. Add `libRTCPrivacySnapshot.a` to `Build Phases -> Link Binary With Libraries`## Usage
``` javascript
let PrivacySnapshot = require('react-native-privacy-snapshot');...
componentWillMount() {
PrivacySnapshot.enabled(true);
},componentWillUnmount() {
PrivacySnapshot.enabled(false);
},```