Installation
Requirements
- React Native 0.75 or newer with the New Architecture enabled, or Expo SDK 51+ with the New Architecture enabled (it is on by default from SDK 52).
- iOS: the minimum iOS version of your React Native release. The podspec uses
min_ios_version_supportedand linksUIKitandPencilKit. - Android: API 24 (Android 7.0) or newer.
The library has no third-party native dependencies: no Skia, no Reanimated, no WebView.
Add the package
npm install react-native-signature-inkyarn add react-native-signature-inkThe library is autolinked. There is no config plugin and nothing to register by hand.
iOS
cd ios && pod installIf you call saveToPhotoLibrary(), add this key to your app's Info.plist. iOS terminates the app if the key is missing when the permission prompt is needed.
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Save your signature to your photo library.</string>Android
No setup is needed on API 29 and newer.
To use saveToPhotoLibrary() on API 28 and older, declare the legacy storage permission in your app's AndroidManifest.xml:
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />The library ships its own FileProvider (class com.signatureink.SignatureInkFileProvider, authority ${applicationId}.signatureinkprovider) for copyToClipboard(). It is merged into your manifest automatically and does not conflict with other FileProvider declarations.
Expo
The library works in development builds and in any project that runs expo prebuild. It does not run in Expo Go, which cannot load custom native code.
npx expo install react-native-signature-ink
npx expo prebuild # or build a dev client / EAS buildOn SDK 51, turn on the New Architecture in app.json with "newArchEnabled": true.
Declare the iOS photo permission in app.json instead of editing Info.plist, because prebuild regenerates it:
{
"expo": {
"ios": {
"infoPlist": {
"NSPhotoLibraryAddUsageDescription": "Save your signature to your photo library."
}
}
}
}For saveToPhotoLibrary() on Android API 28 and older, add WRITE_EXTERNAL_STORAGE with a small config plugin or expo-build-properties. The clipboard FileProvider needs no setup.
After upgrading
The native views are generated from the TypeScript spec at build time. After you upgrade the package, run pod install again and rebuild the native app; a Metro reload is not enough. If Android picks up stale generated code, run ./gradlew clean in android/.
Next
Continue with the Quick start.