-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Braden Hancock
committed
Dec 1, 2023
1 parent
50136ce
commit c00c43f
Showing
110 changed files
with
7,244 additions
and
9,320 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source 'https://rubygems.org' | ||
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version | ||
ruby ">= 3.2.0" | ||
gem 'cocoapods', '~> 1.13' | ||
gem 'activesupport', '~> 7.0', '<= 7.0.8' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
CFPropertyList (3.0.6) | ||
rexml | ||
activesupport (7.0.8) | ||
concurrent-ruby (~> 1.0, >= 1.0.2) | ||
i18n (>= 1.6, < 2) | ||
minitest (>= 5.1) | ||
tzinfo (~> 2.0) | ||
addressable (2.8.5) | ||
public_suffix (>= 2.0.2, < 6.0) | ||
algoliasearch (1.27.5) | ||
httpclient (~> 2.8, >= 2.8.3) | ||
json (>= 1.5.1) | ||
atomos (0.1.3) | ||
claide (1.1.0) | ||
cocoapods (1.13.0) | ||
addressable (~> 2.8) | ||
claide (>= 1.0.2, < 2.0) | ||
cocoapods-core (= 1.13.0) | ||
cocoapods-deintegrate (>= 1.0.3, < 2.0) | ||
cocoapods-downloader (>= 1.6.0, < 2.0) | ||
cocoapods-plugins (>= 1.0.0, < 2.0) | ||
cocoapods-search (>= 1.0.0, < 2.0) | ||
cocoapods-trunk (>= 1.6.0, < 2.0) | ||
cocoapods-try (>= 1.1.0, < 2.0) | ||
colored2 (~> 3.1) | ||
escape (~> 0.0.4) | ||
fourflusher (>= 2.3.0, < 3.0) | ||
gh_inspector (~> 1.0) | ||
molinillo (~> 0.8.0) | ||
nap (~> 1.0) | ||
ruby-macho (>= 2.3.0, < 3.0) | ||
xcodeproj (>= 1.23.0, < 2.0) | ||
cocoapods-core (1.13.0) | ||
activesupport (>= 5.0, < 8) | ||
addressable (~> 2.8) | ||
algoliasearch (~> 1.0) | ||
concurrent-ruby (~> 1.1) | ||
fuzzy_match (~> 2.0.4) | ||
nap (~> 1.0) | ||
netrc (~> 0.11) | ||
public_suffix (~> 4.0) | ||
typhoeus (~> 1.0) | ||
cocoapods-deintegrate (1.0.5) | ||
cocoapods-downloader (1.6.3) | ||
cocoapods-plugins (1.0.0) | ||
nap | ||
cocoapods-search (1.0.1) | ||
cocoapods-trunk (1.6.0) | ||
nap (>= 0.8, < 2.0) | ||
netrc (~> 0.11) | ||
cocoapods-try (1.2.0) | ||
colored2 (3.1.2) | ||
concurrent-ruby (1.2.2) | ||
escape (0.0.4) | ||
ethon (0.16.0) | ||
ffi (>= 1.15.0) | ||
ffi (1.16.3) | ||
fourflusher (2.3.1) | ||
fuzzy_match (2.0.4) | ||
gh_inspector (1.1.3) | ||
httpclient (2.8.3) | ||
i18n (1.14.1) | ||
concurrent-ruby (~> 1.0) | ||
json (2.6.3) | ||
minitest (5.20.0) | ||
molinillo (0.8.0) | ||
nanaimo (0.3.0) | ||
nap (1.1.0) | ||
netrc (0.11.0) | ||
public_suffix (4.0.7) | ||
rexml (3.2.5) | ||
ruby-macho (2.5.1) | ||
typhoeus (1.4.0) | ||
ethon (>= 0.9.0) | ||
tzinfo (2.0.6) | ||
concurrent-ruby (~> 1.0) | ||
xcodeproj (1.23.0) | ||
CFPropertyList (>= 2.3.3, < 4.0) | ||
atomos (~> 0.1.3) | ||
claide (>= 1.0.2, < 2.0) | ||
colored2 (~> 3.1) | ||
nanaimo (~> 0.3.0) | ||
rexml (~> 3.2.4) | ||
|
||
PLATFORMS | ||
arm64-darwin-22 | ||
|
||
DEPENDENCIES | ||
activesupport (~> 7.0, <= 7.0.8) | ||
cocoapods (~> 1.13) | ||
|
||
RUBY VERSION | ||
ruby 3.2.1p31 | ||
|
||
BUNDLED WITH | ||
2.4.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
![iProov: Flexible authentication for identity assurance](https://github.com/iProov/react-native/raw/main/images/banner.jpg) | ||
# iProov Biometrics React Native SDK (Preview) | ||
# iProov Biometrics React Native SDK | ||
|
||
## Table of contents | ||
|
||
|
@@ -18,20 +18,12 @@ | |
## Introduction | ||
The iProov Biometrics React Native SDK wraps iProov's native iOS (Swift) and Android (Java) SDKs behind a JavaScript interface for use from within your React Native iOS or Android app. | ||
|
||
> β οΈ **IMPORTANT:** The iProov Biometrics React Native SDK is currently in preview, which means that there may be missing/broken functionality, and the API is still subject to change. Please contact us to provide your feedback regarding the iProov Biometrics React Native SDK Preview. | ||
### Requirements | ||
|
||
- React Native 0.60 and above | ||
- iOS 12 and above | ||
- React Native 0.72 and above | ||
- iOS 12.4 and above | ||
- Android API Level 21 (Android 5 Lollipop) and above | ||
|
||
## Repository contents | ||
- **src** - contains the React Native bindings for the SDK | ||
- **android** - contains the Android-specific bindings | ||
- **ios** - contains the iOS-specific bindings | ||
- **example** - a basic React Native example app | ||
|
||
## Registration | ||
|
||
You can obtain API credentials by registering on the [iProov Partner Portal](https://portal.iproov.net). | ||
|
@@ -42,7 +34,7 @@ You can obtain API credentials by registering on the [iProov Partner Portal](htt | |
|
||
```json | ||
"dependencies": { | ||
"iproov-react-native": "git+ssh://[email protected]:iProov/react-native.git#0.3.0" | ||
"@iproov/react-native": "1.0.0" | ||
} | ||
``` | ||
|
||
|
@@ -56,33 +48,14 @@ You can obtain API credentials by registering on the [iProov Partner Portal](htt | |
|
||
1. Add an `NSCameraUsageDescription` entry to your app's Info.plist, with the reason why your app requires camera access (e.g. βTo iProov you in order to verify your identity.β) | ||
|
||
2. You need to make various modifications to your Podfile to support iProov: | ||
|
||
1. **Enable frameworks** - Cocoapods by default builds static libraries rather than frameworks. You should add the following to your Podfile: | ||
2. You need to **Enable frameworks** - Cocoapods by default builds static libraries rather than frameworks. You should add the following to your Podfile: | ||
|
||
```ruby | ||
use_frameworks! | ||
``` | ||
Please note that [Flipper](https://fbflipper.com/docs/getting-started/react-native/) does not work with `use_frameworks`, so you should remove `use_flipper()` if you have it enabled. | ||
```ruby | ||
use_frameworks! | ||
``` | ||
Please note that [Flipper](https://fbflipper.com/docs/getting-started/react-native/) does not work with `use_frameworks`, so you should remove it if you have it enabled. | ||
|
||
2. **Ensure React Native builds static frameworks, except for iProov** - Since `use_frameworks!` will now build everything as frameworks, you now need to explicitly set everything to build as static frameworks except for iProov and its dependencies which are dynamic, so you must add this `pre_install` step (or add it to your existing `pre_install` step if you have one already): | ||
```ruby | ||
pre_install do |installer| | ||
installer.pod_targets.each do |pod| | ||
if !['iProov'].include?(pod.name) | ||
def pod.static_framework?; | ||
true | ||
end | ||
def pod.build_type; | ||
Pod::BuildType.static_library | ||
end | ||
end | ||
end | ||
end | ||
``` | ||
2. In your React Native app `ios` directory, run: | ||
3. In your React Native app `ios` directory, run: | ||
|
||
```sh | ||
pod install | ||
|
@@ -107,7 +80,8 @@ allprojects { | |
Once you have a valid token (obtained via the React Native API client or your own backend-to-backend call), you can `launch()` an iProov capture and handle the callback events as follows: | ||
|
||
```javascript | ||
import IProov from 'iproov-react-native' | ||
import IProov from '@iproov/react-native' | ||
import NativeEventEmitter from 'react-native' | ||
|
||
let options = new IProov.Options() | ||
options.filter = { | ||
|
@@ -117,7 +91,9 @@ options.filter = { | |
backgroundColor: '#32a852' | ||
} | ||
|
||
IProov.launch('wss://eu.rp.secure.iproov.me/ws', "< YOUR TOKEN >", options, (event) => { | ||
const eventEmitter = new NativeEventEmitter(IProov.IProovReactNative) | ||
|
||
IProov.launch('wss://eu.rp.secure.iproov.me/ws', "< YOUR TOKEN >", options, eventEmitter, (event) => { | ||
switch(event.name) { | ||
|
||
case IProov.EVENT_CONNECTING: | ||
|
@@ -174,7 +150,7 @@ IProov.launch('wss://eu.rp.secure.iproov.me/ws', "< YOUR TOKEN >", options, (eve | |
}) | ||
``` | ||
|
||
π You should now familiarise yourself with the following resources: | ||
π You should now familiarize yourself with the following resources: | ||
|
||
- [iProov Biometrics iOS SDK documentation](https://github.com/iProov/ios) | ||
- [iProov Biometrics Android SDK documentation](https://github.com/iProov/android) | ||
|
@@ -292,7 +268,7 @@ String localization is handled by adding translations to both native components, | |
|
||
The React Native API Client provides a convenient wrapper to call iProov's REST API v2 from a React Native app. It is a useful tool to assist with testing, debugging and demos, but should not be used in production mobile apps. | ||
|
||
The React Native API client can be found in `ApiClient.js` in the example project. | ||
The React Native API client can be found in `ApiClient.js`. | ||
|
||
To setup your credentials, copy `credentials.example.js` to `credentials.js` and add them to the example project. | ||
|
||
|
@@ -332,9 +308,9 @@ You can then launch the iProov SDK with this token. | |
|
||
For a simple iProov experience that is ready to run out-of-the-box, check out the React Native example project which also makes use of the React Native API Client. | ||
|
||
In the example app folder, copy the `credentials.example.js` file to `credentials.js` and add your credentials obtained from the [iProov portal](https://portal.iproov.com/). | ||
Copy the `credentials.example.js` file to `credentials.js` and add your credentials obtained from the [iProov portal](https://portal.iproov.com/). | ||
|
||
Once you have completed the [installation](#installation) instructions, to run the example app, you should run the following commands from the example project directory: | ||
Once you have completed the [installation](#installation) instructions, to run the example app, you should run the following commands: | ||
|
||
```sh | ||
npx react-native run-android # Run on Android | ||
|
File renamed without changes.
File renamed without changes.
Oops, something went wrong.