Giter Site home page Giter Site logo

react-native-privacy-snapshot's Introduction

Enable privacy snapshot for React Native

In the App Programming Guide for iOS, 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

PrivacySnapshot.enabled(true)

Screenshot of the multi-tasking screen with privacy screenshot

Installation iOS

  1. Run npm install react-native-privacy-snapshot --save in your project directory
  2. Open your project in XCode, right click on Libraries and click Add Files to "Your Project Name"
  3. Within node_modules, find react-native-privacy-snapshot and add RCTPrivacySnapshot.xcodeproj to your project.
  4. Add libRTCPrivacySnapshot.a to Build Phases -> Link Binary With Libraries

Usage

let PrivacySnapshot = require('react-native-privacy-snapshot');

...

  componentWillMount() {
    PrivacySnapshot.enabled(true);
  },

  componentWillUnmount() {
    PrivacySnapshot.enabled(false);
  },

react-native-privacy-snapshot's People

Contributors

rogchap avatar yyoshiki41 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-privacy-snapshot's Issues

'React/RCTBridgeDelegate.h' file not found

After linking this library it gives an error in xcode as

Showing Recent Messages
/react-native/React/Base/RCTBridge.h:10:9: 'React/RCTBridgeDelegate.h' file not found

I have also tried

uncheck parallel build in the scheme

Please help on this

Also pods not installing

skipped the react-native dependency 'react-native-privacy-snapshot'. No podspec file was found.

PodSpec

use_native_modules! skipped the react-native dependency 'react-native-privacy-snapshot'. No podspec file was found.

Please add support for react native version 0.62.2

Yellowbox warning : requiresMainQueueSetup

Module RCTPrivacySnapshot requires main queue setup since it overrides init but doesn't implement requiresMainQueueSetup
In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.

"react-native": "^0.57.8",
"react-native-privacy-snapshot": "^1.0.0",

Double press on home button does not work

Hi

If I single tap, the app goes in background. Now if i see the app listing (by double tapping) I see that the app is blurred.

If I double-tap when the app is in fore-ground, I go directly on app listing, but it is not blurred.

See the video http://jmp.sh/G9Q8k63

Regards
Waqqas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.