react-native-background-clipboard
v1.0.1
Published
## Getting started
Downloads
13
Maintainers
Readme
react-native-background-clipboard
Getting started
$ npm install react-native-background-clipboard --save
Mostly automatic installation
$ react-native link react-native-background-clipboard
Manual installation
iOS (WIP)
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-background-clipboard
and addRNReactNativeBackgroundClipboard.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNReactNativeBackgroundClipboard.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNReactNativeBackgroundClipboardPackage;
to the imports at the top of the file - Add
new RNReactNativeBackgroundClipboardPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-background-clipboard' project(':react-native-background-clipboard').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-clipboard/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-background-clipboard')
Windows (Not yet implemented)
- In Visual Studio add the
RNReactNativeBackgroundClipboard.sln
innode_modules/react-native-background-clipboard/windows/RNReactNativeBackgroundClipboard.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using React.Native.Background.Clipboard.RNReactNativeBackgroundClipboard;
to the usings at the top of the file - Add
new RNReactNativeBackgroundClipboardPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNReactNativeBackgroundClipboard from "react-native-background-clipboard";
RNReactNativeBackgroundClipboard.runBackgroundClipboard(event => {
console.log("on clipboard", event);
});