diff --git a/README.md b/README.md index f1c6563..03fd28d 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,30 @@ # react-native-screenshot-detector -Note: this project is designed to work with the newer version of React Native library imports, i.e. React Native >= 0.40.0 +Note: this project is designed to work with the newer version of React Native library imports, i.e. React Native >= 0.40.0, and will only work on iOS as Android does not provide the underlying functionality needed to track screenshots. ## Getting started -`$ npm install react-native-screenshot-detector --save` +React Native < 0.60.0 + +`$ npm install react-native-screenshot-detector` `$ react-native link react-native-screenshot-detector` +React Native >= 0.60.0 + +`$ npm install react-native-screenshot-detector` ## Usage +Update the AppDelegate.m file to include the following: + # iOS ```objectivec #import +......... + - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // ... setup code diff --git a/RNScreenshotDetector.podspec b/RNScreenshotDetector.podspec new file mode 100644 index 0000000..a6ac250 --- /dev/null +++ b/RNScreenshotDetector.podspec @@ -0,0 +1,19 @@ +require 'json' + +package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) + +Pod::Spec.new do |s| + s.name = 'RNScreenshotDetector' + s.version = package['version'] + s.summary = package['description'] + s.license = package['license'] + + s.authors = package['author'] + s.homepage = package['homepage'] + s.platform = :ios, "9.0" + + s.source = { :git => "https://github.com/blend/react-native-screenshot-detector.git", :tag => "v#{s.version}" } + s.source_files = "ios/**/*.{h,m}" + + s.dependency 'React' +end diff --git a/package.json b/package.json index b1d8844..63ceef4 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,9 @@ { "name": "react-native-screenshot-detector", - "version": "1.0.0", - "description": "", + "version": "1.0.1", + "homepage": "https://github.com/blend/react-native-screenshot-detector", + "description": "A tool for detecting ios screenshots on iOS", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" @@ -13,7 +14,7 @@ "author": "gcarling", "repository": { "type": "git", - "url": "https://github.com/blendlabs/react-native-screenshot-detector" + "url": "https://github.com/blend/react-native-screenshot-detector" }, "license": "MIT" }