2.9.7 • Published 4 months ago

react-native-persona v2.9.7

Weekly downloads
975
License
MIT
Repository
-
Last release
4 months ago

Persona Android SDKs and Demo

Development

First, run yarn in the project root.

yarn

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

Start Metro bundler.

This will bundle JavaScript and serve it to your React Native sample app. Keep the Metro bundler running in a terminal.

yarn example start

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 example start --reset-cache again.

Start example app in iOS simulator

Use the built-in CLI command with Metro running.

yarn example ios

Or open ios/example.xcworkspace in XCode and build + run.

Start example app in Android simulator

Use the built-in CLI command with Metro running.

yarn example android

Or open the Android project in Android Studio and build + run.

Adding Dependencies

If you need to add any open source dependencies to this project, you'll need to make sure that the license for that project is acceptable. At the time of writing, licenses that are not GPL, LGPL, or AGPL are likely to be acceptable. Please consult with #legal for specific questions though.

We use the license_finder gem to ensure that we're only using open source projects with licenses that we explicitly allow. If and when you need to add a new license to our allow-list, you can edit the file at doc/dependency_decisions.yml accordingly. If you check out license_finder's documentation, you'll see how to use the tool to make these updates to the yml file.

Installing in your own project

yarn add react-native-persona

Usage

import {Environment, Inquiry} from "react-native-persona";

// Start an inquiry.
Inquiry.fromTemplate('itmpl_Ygs16MKTkA6obnF8C3Rb17dm')
  .environment(Environment.SANDBOX)
  .onComplete((inquiryId, status, fields) =>
    Alert.alert('Complete', `Inquiry ${inquiryId} completed with status "${status}."`,),
  )
  .onCanceled((inquiryId, sessionToken) =>
    Alert.alert('Canceled', `Inquiry ${inquiryId} was cancelled`),
  )
  .onError(error => Alert.alert('Error', error.message))
  .build()
  .start();

Theming

Set your own colors, buttons, fonts, and more. This can be done via the Persona Dashboard. For more information on using the theme editor, see our help article.

Updating SDK Versions

Android

Update the sdk version in android/build.gradle

implementation 'com.withpersona.sdk2:inquiry:X.Y.Z'

iOS

Update the sdk version in RNPersonaInquiry2.podspec

s.dependency 'PersonaInquirySDK2', '~> X.Y.Z'

Go to example/ios directory, update the Podfiles by running

pod update PersonaInquirySDK2 --repo-update
pod install --repo-update

React Native

Bump react native version in package.json if needed.

Commit and push changed files including:

  • android/build.gradle
  • RNPersonaInquiry2.podspec
  • package.json
  • example/ios/Podfile.lock
2.9.6

5 months ago

2.9.5

5 months ago

2.9.7

4 months ago

2.9.4

9 months ago

2.6.17

11 months ago

2.6.18

11 months ago

2.9.2

10 months ago

2.9.1

11 months ago

2.9.3

10 months ago

2.9.0

11 months ago

2.6.16

1 year ago

2.8.13

1 year ago

2.6.15

1 year ago

2.8.12

1 year ago

2.6.13

1 year ago

2.6.14

1 year ago

2.8.11

1 year ago

2.6.11

1 year ago

2.6.12

1 year ago

2.8.9

1 year ago

2.8.8

1 year ago

2.8.10

1 year ago

2.6.10

1 year ago

2.6.9

1 year ago

2.8.7

1 year ago

2.8.6

1 year ago

2.8.5

1 year ago

2.6.8

1 year ago

2.8.4

1 year ago

2.8.3

1 year ago

2.8.1

2 years ago

2.8.0

2 years ago

2.8.2

2 years ago

2.7.5

2 years ago

2.7.2

2 years ago

2.6.3

2 years ago

2.7.4

2 years ago

2.7.3

2 years ago

2.6.5

2 years ago

2.6.4

2 years ago

2.6.7

2 years ago

2.6.6

2 years ago

2.7.1

2 years ago

2.6.2

2 years ago

2.7.0

2 years ago

2.6.1

2 years ago

2.6.0

2 years ago

1.3.5

2 years ago

2.4.1

2 years ago

2.4.0

2 years ago

2.4.3

2 years ago

2.4.2

2 years ago

2.4.4

2 years ago

2.3.0

2 years ago

2.5.0

2 years ago

2.2.30

2 years ago

2.2.28

3 years ago

2.2.29

3 years ago

2.2.26

3 years ago

2.2.27

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

2.2.24

3 years ago

2.2.25

3 years ago

2.2.22

3 years ago

2.2.23

3 years ago

2.2.17

3 years ago

2.2.18

3 years ago

2.2.15

3 years ago

2.2.16

3 years ago

2.2.13

3 years ago

2.2.14

3 years ago

2.2.11

3 years ago

2.2.12

3 years ago

2.2.10

3 years ago

2.2.19

3 years ago

2.2.20

3 years ago

2.2.21

3 years ago

2.2.5

3 years ago

2.2.4

3 years ago

2.2.7

3 years ago

2.2.6

3 years ago

2.2.9

3 years ago

2.2.8

3 years ago

2.2.3

3 years ago

1.3.1

3 years ago

1.2.8

4 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.2.2

3 years ago

1.2.10

3 years ago

1.2.11

3 years ago

1.3.0

3 years ago

2.1.2

3 years ago

2.1.1

4 years ago

2.1.3

3 years ago

1.2.9

3 years ago

2.1.0

4 years ago

1.2.7

4 years ago

2.0.3

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

1.2.4

4 years ago

2.0.0

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4-beta.2

5 years ago

1.0.4

5 years ago

1.0.4-beta.0

5 years ago

1.0.4-beta.1

5 years ago

1.0.3-beta.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.2-beta.1

5 years ago

1.0.2-beta.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.12.5

5 years ago

0.12.4

5 years ago

0.12.3

5 years ago

0.12.2

5 years ago

0.12.1

5 years ago

0.12.0

5 years ago

0.11.1

5 years ago

0.11.0

5 years ago

0.10.1

5 years ago

0.10.0

5 years ago

0.3.0

5 years ago

0.3.1

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.0-alpha.0

5 years ago