New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-persona

Package Overview
Dependencies
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-persona

Launch a mobile native implementation of the Persona inquiry flow from React Native.

  • 0.1.0
  • npm
  • Socket score

Version published
Weekly downloads
18K
increased by4.31%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-persona

Development

First, run yarn in the project root.

$ yarn

To test changes to SDK, we will use the Example App in example app.

Install dependencies for example app

We will be using this example app to test our plugin. The plugin cannot compile on it's own and needs an example app to act as a "harness" for testing.

$ cd example
$ yarn

iOS only: Install Pods

Make sure you have Cocoapods installed.

Then, install iOS pods.

$ cd ios
$ pod install

Android only: Ensure you have proper SDK/gradle version

Ensure you have the proper Java and Gradle version installed. If you haven't installed these yet, you can install sdkman

$ sdk current java
Using java version 8.0.242.hs-adpt
$ sdk current gradle
Using gradle version 5.6.4

If the versions do not line up, please run sdk install java 8.0.242.hs-adpt and sdk install gradle 5.6.4.

Start metro bundler. This will bundle JS and serve it to your React Native sample app.

$ cd example
$ yarn start --reset-cache

Metro bundler compiles source code and caches compiled targets to speed up incremental rebuilds. However, it's possible that this can lead to random failures if things get out of sync. If you ever run into any weird issues, it's worth running yarn start --reset-cache again.

Start example app in iOS simulator

Open ios/example.xcworkspace in XCode and build + run.

Or use the built-in CLI command.

yarn ios

Start example app in Android simulator

Open the android project in Android Studio and build + run.

Or use the built-in CLI command.

yarn android

Installing in your own project


yarn add react-native-persona --save

Mostly automatic installation

On React Native version 0.60.0 and above, you're done!

On React Native versions < 0.60.0, you will need to manually link.

react-native link react-native-persona

Usage

import Inquiry from "react-native-persona";

// Start an inquiry.
Inquiry.fromTemplate("tmpl_20dk2j3hfhdnsja92k3")
  .onSuccess(handleSuccess)
  .onCancelled(handleCancelled)
  .onFailed(handleFailed)
  .onError(handleError)
  .build()
  .start();

Keywords

FAQs

Package last updated on 08 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc