@trunkrs/react-native-signature-capture
v0.1.25
Published
A native signature plugin for iOS and Android.
Downloads
5
Readme
react-native-signature-pad
Getting started
$ npm install react-native-signature-pad --save
Mostly automatic installation
$ react-native link react-native-signature-pad
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-signature-pad
and addTRNReactNativeSignaturePad.xcodeproj
- In XCode, in the project navigator, select your project. Add
libTRNReactNativeSignaturePad.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.trunkrs.signature-pad.TRNReactNativeSignaturePadPackage;
to the imports at the top of the file - Add
new TRNReactNativeSignaturePadPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-signature-pad' project(':react-native-signature-pad').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-signature-pad/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-signature-pad')
Usage
import TRNReactNativeSignaturePad from 'react-native-signature-pad';
// TODO: What to do with the module?
TRNReactNativeSignaturePad;