1.3.0 • Published 8 months ago

@go.saffe/go-saffe-react-native v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago
# go-saffe-react-native

Package to render saffe capture.

## Installation

```bash
npm install @go.saffe/go-saffe-react-native

Usage

import SaffeCapture from "@go.saffe/go-saffe-react-native";

// ...
<SaffeCapture
  captureKey={} // capture key (sandbox or production)
  user={} // user identifier (either email or CPF)
  type={} // "onboarding" or "verification"
  endToEndId={} // identifier to keep consistency between front and backend
  onLoad={} // callback function called when component is loading
  onError={} // callback function called to catch error from component
  onClose={} // callback function called when end-user closes (cancels) the capture
  onFinish={} // callback function called when end-user finishes (completes) the capture
  onTimeout={} // callback function called when the capture ends for timeout
/>

Native Configuration

This component uses a WebView that requires native permissions to access the camera and location. Make sure to update the native configuration in your app and note that location must be enabled in our panel.

iOS (Info.plist):

<key>NSCameraUsageDescription</key>
<string>We need camera access</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We need location access</string>

Android (AndroidManifest.xml):

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Expo Configuration

If you're using Expo, add the following settings in your app.json or app.config.js:

{
  "expo": {
    "ios": {
      "infoPlist": {
        "NSCameraUsageDescription": "camera access description",
        "NSLocationWhenInUseUsageDescription": "location access description"
      }
    },
    "android": {
      "permissions": [
        "CAMERA",
        "ACCESS_FINE_LOCATION"
      ]
    }
  }
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

1.3.0

8 months ago

1.2.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.4

2 years ago