Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacup committed Dec 4, 2019
1 parent f1ae78d commit d8df780
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ Note: this project is designed to work with the newer version of React Native li

React Native < 0.60.0

`$ npm install react-native-screenshot-detect`
`npm install react-native-screenshot-detect`

`$ react-native link react-native-screenshot-detect`
`react-native link react-native-screenshot-detect`

React Native >= 0.60.0

`$ npm install react-native-screenshot-detect`
`npm install react-native-screenshot-detect`

`pod install` inside of the ios sub folder


## Usage

Expand Down Expand Up @@ -45,7 +48,7 @@ Update the AppDelegate.m file to include the following:
import * as ScreenshotDetector from 'react-native-screenshot-detect';

// Subscribe callback to screenshots:
this.eventEmitter = ScreenshotDetector.subscribe(function() { ... });
this.eventEmitter = ScreenshotDetector.subscribe(() => { ... });

// Unsubscribe later (a good place would be componentWillUnmount)
ScreenshotDetector.unsubscribe(this.eventEmitter);
Expand Down

0 comments on commit d8df780

Please sign in to comment.