react-native-plaid-link-sdk 12.8.3 → 13.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1470 -0
- package/README.md +217 -239
- package/V13_MIGRATION_GUIDE.md +470 -0
- package/android/build.gradle +30 -98
- package/android/src/main/AndroidManifest.xml +1 -8
- package/android/src/main/java/expo/modules/plaidlinksdk/PlaidEmbeddedResultDispatcher.kt +19 -0
- package/android/src/main/java/expo/modules/plaidlinksdk/PlaidResultMappers.kt +217 -0
- package/android/src/main/java/expo/modules/plaidlinksdk/RNPlaidLinkSdkVersion.kt +5 -0
- package/android/src/main/java/expo/modules/plaidlinksdk/ReactNativePlaidLinkSdkModule.kt +183 -0
- package/android/src/main/java/expo/modules/plaidlinksdk/ReactNativePlaidLinkSdkView.kt +69 -0
- package/build/PlaidEmbeddedSearchView.d.ts +12 -0
- package/build/PlaidEmbeddedSearchView.d.ts.map +1 -0
- package/build/PlaidEmbeddedSearchView.js +8 -0
- package/build/PlaidEmbeddedSearchView.js.map +1 -0
- package/{dist/src/Types.d.ts → build/ReactNativePlaidLinkSdk.types.d.ts} +78 -47
- package/build/ReactNativePlaidLinkSdk.types.d.ts.map +1 -0
- package/{dist/build → build}/ReactNativePlaidLinkSdk.types.js +82 -71
- package/build/ReactNativePlaidLinkSdk.types.js.map +1 -0
- package/build/ReactNativePlaidLinkSdkModule.d.ts +16 -0
- package/build/ReactNativePlaidLinkSdkModule.d.ts.map +1 -0
- package/{dist/build → build}/ReactNativePlaidLinkSdkModule.js +1 -1
- package/build/ReactNativePlaidLinkSdkModule.js.map +1 -0
- package/build/index.d.ts +13 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +82 -0
- package/build/index.js.map +1 -0
- package/expo-module.config.json +9 -0
- package/ios/Frameworks/LinkKit.xcframework/Info.plist +44 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/LinkKit-Swift.h +327 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/LinkKit.h +22 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Info.plist +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/LinkKit +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.abi.json +53695 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.private.swiftinterface +759 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftinterface +759 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/module.modulemap +11 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/PrivacyInfo.xcprivacy +32 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/_CodeSignature/CodeResources +201 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/LinkKit-Swift.h +650 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/LinkKit.h +22 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Info.plist +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/LinkKit +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.abi.json +53695 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +759 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +759 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +53695 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +759 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +759 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/module.modulemap +11 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/PrivacyInfo.xcprivacy +32 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/_CodeSignature/CodeResources +256 -0
- package/ios/ReactNativePlaidLinkSdk.podspec +29 -0
- package/ios/src/PlaidEmbeddedSearchView.swift +101 -0
- package/ios/src/RNPlaidLinkSdkVersion.swift +19 -0
- package/ios/src/ReactNativePlaidLinkSdkModule.swift +555 -0
- package/package.json +65 -73
- package/src/PlaidEmbeddedSearchView.tsx +35 -0
- package/src/ReactNativePlaidLinkSdk.types.ts +894 -0
- package/src/ReactNativePlaidLinkSdkModule.ts +31 -0
- package/src/index.ts +166 -22
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/android/gradle.properties +0 -31
- package/android/gradlew +0 -174
- package/android/gradlew.bat +0 -89
- package/android/src/main/java/com/plaid/ActivityResultHandler.java +0 -7
- package/android/src/main/java/com/plaid/ActivityResultManager.java +0 -15
- package/android/src/main/java/com/plaid/GlobalFunctions.kt +0 -42
- package/android/src/main/java/com/plaid/PLKEmbeddedView.kt +0 -161
- package/android/src/main/java/com/plaid/PLKEmbeddedViewManager.kt +0 -50
- package/android/src/main/java/com/plaid/PlaidModule.kt +0 -291
- package/android/src/main/java/com/plaid/PlaidPackage.java +0 -117
- package/android/src/main/java/com/plaid/gson/PlaidJsonConverter.kt +0 -94
- package/android/src/main/java/com/plaid/gson/RNAccountAdapter.kt +0 -48
- package/android/src/main/java/com/plaid/gson/RNEventMetadataAdapter.kt +0 -49
- package/android/src/main/java/com/plaid/gson/RNLinkInstitutionAdapter.kt +0 -34
- package/android/src/main/res/layout/plk_embedded_view.xml +0 -5
- package/android/src/paper/java/com/facebook/react/viewmanagers/PLKEmbeddedViewManagerDelegate.java +0 -35
- package/android/src/paper/java/com/facebook/react/viewmanagers/PLKEmbeddedViewManagerInterface.java +0 -18
- package/android/src/paper/java/com/plaid/NativePlaidLinkModuleAndroidSpec.java +0 -64
- package/android/src/paper/java/com/plaid/NativePlaidLinkModuleiOSSpec.java +0 -59
- package/dist/build/EmbeddedLink/EmbeddedLinkView.d.ts +0 -2
- package/dist/build/EmbeddedLink/EmbeddedLinkView.js +0 -56
- package/dist/build/EmbeddedLink/EmbeddedLinkView.web.d.ts +0 -1
- package/dist/build/EmbeddedLink/EmbeddedLinkView.web.js +0 -2
- package/dist/build/EmbeddedLink/NativeEmbeddedLinkView.d.ts +0 -2
- package/dist/build/EmbeddedLink/NativeEmbeddedLinkView.js +0 -3
- package/dist/build/PlaidEmbeddedSearchView.d.ts +0 -2
- package/dist/build/PlaidEmbeddedSearchView.js +0 -25
- package/dist/build/PlaidLink.d.ts +0 -7
- package/dist/build/PlaidLink.js +0 -137
- package/dist/build/ReactNativePlaidLinkSdk.types.d.ts +0 -108
- package/dist/build/ReactNativePlaidLinkSdkModule.d.ts +0 -2
- package/dist/build/ReactNativePlaidLinkSdkView.d.ts +0 -2
- package/dist/build/ReactNativePlaidLinkSdkView.js +0 -7
- package/dist/build/Types.d.ts +0 -108
- package/dist/build/Types.js +0 -462
- package/dist/build/fabric/EmbeddedLinkViewNativeComponent.d.ts +0 -2
- package/dist/build/fabric/EmbeddedLinkViewNativeComponent.js +0 -3
- package/dist/build/fabric/NativePlaidLinkModuleAndroid.d.ts +0 -2
- package/dist/build/fabric/NativePlaidLinkModuleAndroid.js +0 -5
- package/dist/build/fabric/NativePlaidLinkModuleiOS.d.ts +0 -2
- package/dist/build/fabric/NativePlaidLinkModuleiOS.js +0 -5
- package/dist/build/fabric/fabricUtils.d.ts +0 -1
- package/dist/build/fabric/fabricUtils.js +0 -2
- package/dist/build/index.d.ts +0 -14
- package/dist/build/index.js +0 -154
- package/dist/scripts/check-package-entrypoints.d.ts +0 -1
- package/dist/scripts/check-package-entrypoints.js +0 -61
- package/dist/src/EmbeddedLink/EmbeddedLinkView.d.ts +0 -13
- package/dist/src/EmbeddedLink/EmbeddedLinkView.js +0 -55
- package/dist/src/EmbeddedLink/EmbeddedLinkView.web.d.ts +0 -1
- package/dist/src/EmbeddedLink/EmbeddedLinkView.web.js +0 -1
- package/dist/src/EmbeddedLink/NativeEmbeddedLinkView.d.ts +0 -2
- package/dist/src/EmbeddedLink/NativeEmbeddedLinkView.js +0 -2
- package/dist/src/PlaidLink.d.ts +0 -34
- package/dist/src/PlaidLink.js +0 -136
- package/dist/src/Types.js +0 -463
- package/dist/src/__tests__/Types.tests.d.ts +0 -1
- package/dist/src/__tests__/Types.tests.js +0 -14
- package/dist/src/fabric/EmbeddedLinkViewNativeComponent.d.ts +0 -15
- package/dist/src/fabric/EmbeddedLinkViewNativeComponent.js +0 -2
- package/dist/src/fabric/NativePlaidLinkModuleAndroid.d.ts +0 -15
- package/dist/src/fabric/NativePlaidLinkModuleAndroid.js +0 -4
- package/dist/src/fabric/NativePlaidLinkModuleiOS.d.ts +0 -15
- package/dist/src/fabric/NativePlaidLinkModuleiOS.js +0 -4
- package/dist/src/fabric/fabricUtils.d.ts +0 -1
- package/dist/src/fabric/fabricUtils.js +0 -1
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.js +0 -5
- package/ios/PLKEmbeddedView.m +0 -7
- package/ios/PLKEmbeddedView.swift +0 -116
- package/ios/PLKEmbeddedViewComponentView.h +0 -28
- package/ios/PLKEmbeddedViewComponentView.mm +0 -91
- package/ios/PLKEmbeddedViewManager.swift +0 -14
- package/ios/PLKFabricHelpers.h +0 -116
- package/ios/RNLinksdk-Bridging-Header.h +0 -8
- package/ios/RNLinksdk.h +0 -19
- package/ios/RNLinksdk.mm +0 -732
- package/ios/RNPlaidHelper.h +0 -15
- package/ios/RNPlaidHelper.m +0 -33
- package/ios/react_native_plaid_link_sdk.h +0 -2
- package/react-native-plaid-link-sdk.podspec +0 -40
- package/src/EmbeddedLink/EmbeddedLinkView.tsx +0 -95
- package/src/EmbeddedLink/EmbeddedLinkView.web.tsx +0 -5
- package/src/EmbeddedLink/NativeEmbeddedLinkView.tsx +0 -3
- package/src/PlaidLink.tsx +0 -167
- package/src/Types.ts +0 -634
- package/src/__tests__/Types.tests.ts +0 -15
- package/src/fabric/EmbeddedLinkViewNativeComponent.ts +0 -24
- package/src/fabric/NativePlaidLinkModuleAndroid.ts +0 -32
- package/src/fabric/NativePlaidLinkModuleiOS.ts +0 -33
- package/src/fabric/fabricUtils.ts +0 -2
package/README.md
CHANGED
|
@@ -1,300 +1,278 @@
|
|
|
1
1
|
# Plaid React Native SDK
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
React Native SDK for Plaid Link, built on Expo Modules for the v13 native
|
|
4
|
+
architecture. The SDK supports Expo apps and bare React Native apps through the
|
|
5
|
+
same session-based JavaScript API.
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
## API documentation
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
[
|
|
9
|
+
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/react-native-plaid-link-sdk/)
|
|
10
|
+
- [Documentation for the main branch](https://docs.expo.dev/versions/unversioned/sdk/react-native-plaid-link-sdk/)
|
|
11
|
+
- [Plaid Link documentation](https://plaid.com/docs/link/)
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
## Requirements
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
### React Native and Expo
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
- React Native 0.76 or newer
|
|
18
|
+
- Expo 52 or newer, or bare React Native with Expo Modules installed
|
|
19
|
+
- A development build, custom native build, or bare native app
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- A function to dismiss link on iOS.
|
|
21
|
+
Expo Go is not supported because Plaid Link includes custom native code. Expo
|
|
22
|
+
apps should use a development build or another app build that includes this
|
|
23
|
+
native module.
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
### iOS
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
- iOS 15.1 or newer
|
|
28
|
+
- Xcode 16.1 or newer
|
|
29
|
+
- CocoaPods for installing native dependencies
|
|
25
30
|
|
|
26
|
-
|
|
31
|
+
### Android
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
- Android Studio 4.0 or newer
|
|
34
|
+
- Kotlin 1.9.25 or newer for Kotlin integrations
|
|
35
|
+
- A package name registered in the Plaid Dashboard for Android OAuth flows
|
|
29
36
|
|
|
30
|
-
|
|
31
|
-
npm install --save react-native-plaid-link-sdk
|
|
32
|
-
```
|
|
37
|
+
## Compatibility
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
The SDK supports React Native 0.76 or newer and Expo 52 or newer. Expo support
|
|
40
|
+
requires a development build, custom native build, or bare native app; Expo Go is
|
|
41
|
+
not supported.
|
|
35
42
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
| Lane | React Native | Expo | CI coverage |
|
|
44
|
+
| ----------------- | ------------ | ---- | ----------------------------------------------------------------------------------- |
|
|
45
|
+
| Minimum supported | 0.76 | 52 | Peer install and package export smoke test |
|
|
46
|
+
| Current example | 0.83 | 55 | Peer install and package export smoke test, Android unit tests, iOS simulator build |
|
|
47
|
+
| Latest Expo | 0.85 | 56 | Packed SDK install and iOS prebuild smoke test |
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
The root package unit tests run against the repository's development
|
|
50
|
+
dependencies, while the example app validates the current native integration on
|
|
51
|
+
both platforms.
|
|
43
52
|
|
|
44
|
-
|
|
45
|
-
- Your `compileSdkVersion` must be `33`.
|
|
46
|
-
- Android gradle plugin `4.x` and above.
|
|
53
|
+
## Migration guides
|
|
47
54
|
|
|
48
|
-
|
|
55
|
+
- [v13 migration guide](./V13_MIGRATION_GUIDE.md)
|
|
49
56
|
|
|
50
|
-
|
|
57
|
+
## Installation
|
|
51
58
|
|
|
52
|
-
###
|
|
59
|
+
### Expo projects
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
Install the package in an Expo project, then run the app in a development build
|
|
62
|
+
or another custom native runtime.
|
|
55
63
|
|
|
56
|
-
|
|
64
|
+
```sh
|
|
65
|
+
npm install react-native-plaid-link-sdk
|
|
66
|
+
```
|
|
57
67
|
|
|
58
|
-
|
|
68
|
+
If you are adding the SDK to an existing Expo app, rebuild the native app after
|
|
69
|
+
installation so the Plaid native module is included.
|
|
59
70
|
|
|
60
|
-
|
|
61
|
-
function createLinkTokenConfiguration(
|
|
62
|
-
token: string,
|
|
63
|
-
noLoadingState: boolean = false,
|
|
64
|
-
): LinkTokenConfiguration {
|
|
65
|
-
return {
|
|
66
|
-
token: token,
|
|
67
|
-
// Hides native activity indicator if true.
|
|
68
|
-
noLoadingState: noLoadingState,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
+
### Bare React Native projects
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
After calling `create`, you can subsequently invoke the `open` function. Note that maximizing the delay between these two calls will reduce latency for your users by allowing Link more time to load.
|
|
77
|
-
|
|
78
|
-
```typescript
|
|
79
|
-
function createLinkOpenProps(): LinkOpenProps {
|
|
80
|
-
return {
|
|
81
|
-
onSuccess: (success: LinkSuccess) => {
|
|
82
|
-
// User was able to successfully link their account.
|
|
83
|
-
console.log('Success: ', success);
|
|
84
|
-
},
|
|
85
|
-
onExit: (linkExit: LinkExit) => {
|
|
86
|
-
// User exited Link session. There may or may not be an error depending on what occured.
|
|
87
|
-
console.log('Exit: ', linkExit);
|
|
88
|
-
dismissLink();
|
|
89
|
-
},
|
|
90
|
-
// MODAL or FULL_SCREEEN presentation on iOS. Defaults to MODAL.
|
|
91
|
-
iOSPresentationStyle: LinkIOSPresentationStyle.MODAL,
|
|
92
|
-
logLevel: LinkLogLevel.ERROR,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
73
|
+
Bare React Native apps must install and configure the `expo` package before
|
|
74
|
+
using this SDK.
|
|
95
75
|
|
|
96
|
-
|
|
97
|
-
|
|
76
|
+
```sh
|
|
77
|
+
npm install react-native-plaid-link-sdk expo
|
|
78
|
+
npx pod-install
|
|
98
79
|
```
|
|
99
80
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
```typescript
|
|
105
|
-
// Create PlaidLinkProps from the provided token string.
|
|
106
|
-
function makeLinkTokenProps(token: string): PlaidLinkProps {
|
|
107
|
-
return {
|
|
108
|
-
tokenConfig: {
|
|
109
|
-
token: token,
|
|
110
|
-
logLevel: LinkLogLevel.ERROR,
|
|
111
|
-
// Hides native activity indicator if true.
|
|
112
|
-
noLoadingState: false,
|
|
113
|
-
},
|
|
114
|
-
onSuccess: (success: LinkSuccess) => {
|
|
115
|
-
// User was able to successfully link their account.
|
|
116
|
-
console.log('Success: ', success);
|
|
117
|
-
success.metadata.accounts.forEach(it => console.log('accounts', it));
|
|
118
|
-
},
|
|
119
|
-
onExit: (linkExit: LinkExit) => {
|
|
120
|
-
// User exited Link session. There may or may not be an error depending on what occured.
|
|
121
|
-
console.log('Exit: ', linkExit);
|
|
122
|
-
dismissLink();
|
|
123
|
-
},
|
|
124
|
-
// MODAL or FULL_SCREEEN presentation on iOS. Defaults to MODAL.
|
|
125
|
-
iOSPresentationStyle: LinkIOSPresentationStyle.MODAL,
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const linkTokenProps = makeLinkTokenProps("#GENERATED_LINK_TOKEN#");
|
|
130
|
-
openLink(linkTokenProps);
|
|
131
|
-
```
|
|
81
|
+
Follow Expo's guide for
|
|
82
|
+
[installing Expo Modules in an existing React Native app](https://docs.expo.dev/bare/installing-expo-modules/)
|
|
83
|
+
if your bare app does not already use Expo Modules.
|
|
132
84
|
|
|
133
|
-
|
|
85
|
+
## Plaid Dashboard setup
|
|
134
86
|
|
|
135
|
-
|
|
87
|
+
Configure the native app identifiers that your app will use with Link:
|
|
136
88
|
|
|
137
|
-
|
|
89
|
+
- Android package names
|
|
90
|
+
- iOS bundle identifiers
|
|
91
|
+
- OAuth redirect URIs for every environment your app supports
|
|
138
92
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
3. Enter your package name, for example `com.plaid.example`.
|
|
143
|
-
4. Click "Save Changes", you may be prompted to re-enter your password.
|
|
93
|
+
The link token passed to this SDK must be created by your server with the Link
|
|
94
|
+
configuration for the flow you want to launch. Do not create link tokens in the
|
|
95
|
+
mobile app.
|
|
144
96
|
|
|
145
|
-
|
|
97
|
+
## Standard Link
|
|
146
98
|
|
|
147
|
-
|
|
148
|
-
1. Redirect URIs must be [registered](https://plaid.com/docs/link/ios/#register-your-redirect-uri), and set up as [universal links](https://developer.apple.com/documentation/xcode/supporting-associated-domains).
|
|
149
|
-
2. Your native iOS application, must be configured with your associated domain. See your iOS [set up universal links](https://plaid.com/docs/link/ios/#set-up-universal-links) for more information.
|
|
99
|
+
Create a Link session with a link token, then open it from your UI.
|
|
150
100
|
|
|
101
|
+
```ts
|
|
102
|
+
import { createPlaidLinkSession } from "react-native-plaid-link-sdk";
|
|
103
|
+
|
|
104
|
+
const session = await createPlaidLinkSession({
|
|
105
|
+
token: "#GENERATED_LINK_TOKEN#",
|
|
106
|
+
onSuccess: (success) => {
|
|
107
|
+
console.log("Success", success);
|
|
108
|
+
},
|
|
109
|
+
onExit: (exit) => {
|
|
110
|
+
console.log("Exit", exit);
|
|
111
|
+
},
|
|
112
|
+
onEvent: (event) => {
|
|
113
|
+
console.log("Event", event);
|
|
114
|
+
},
|
|
115
|
+
onLoad: () => {
|
|
116
|
+
console.log("Link loaded");
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
await session.open();
|
|
121
|
+
```
|
|
151
122
|
|
|
152
|
-
|
|
123
|
+
Pass `true` to `session.open(true)` to request full-screen presentation on iOS.
|
|
124
|
+
The default presentation is used when this argument is omitted or `false`.
|
|
153
125
|
|
|
154
|
-
|
|
126
|
+
## Layer
|
|
155
127
|
|
|
156
|
-
|
|
128
|
+
Layer uses a dedicated session object. Submit user data once the Layer session is
|
|
129
|
+
ready, then open Link when the Layer flow emits the ready event.
|
|
157
130
|
|
|
131
|
+
```ts
|
|
132
|
+
import {
|
|
133
|
+
LinkEventName,
|
|
134
|
+
PlaidLayerSession,
|
|
135
|
+
createPlaidLayerSession,
|
|
136
|
+
} from "react-native-plaid-link-sdk";
|
|
137
|
+
|
|
138
|
+
let session: PlaidLayerSession;
|
|
139
|
+
|
|
140
|
+
session = await createPlaidLayerSession({
|
|
141
|
+
token: "#GENERATED_LINK_TOKEN#",
|
|
142
|
+
onSuccess: (success) => {
|
|
143
|
+
console.log("Success", success);
|
|
144
|
+
},
|
|
145
|
+
onExit: (exit) => {
|
|
146
|
+
console.log("Exit", exit);
|
|
147
|
+
},
|
|
148
|
+
onEvent: async (event) => {
|
|
149
|
+
if (event.eventName === LinkEventName.LAYER_READY) {
|
|
150
|
+
await session.open();
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
await session.submit({
|
|
156
|
+
phoneNumber: "415-555-0017",
|
|
157
|
+
dateOfBirth: "1975-01-18",
|
|
158
|
+
});
|
|
159
|
+
```
|
|
158
160
|
|
|
159
|
-
|
|
161
|
+
## Headless Link
|
|
160
162
|
|
|
161
|
-
|
|
163
|
+
Headless Link creates a session that starts without presenting the standard Link
|
|
164
|
+
UI.
|
|
162
165
|
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
```ts
|
|
167
|
+
import { createPlaidHeadlessSession } from "react-native-plaid-link-sdk";
|
|
168
|
+
|
|
169
|
+
const session = await createPlaidHeadlessSession({
|
|
170
|
+
token: "#GENERATED_LINK_TOKEN#",
|
|
171
|
+
onSuccess: (success) => {
|
|
172
|
+
console.log("Success", success);
|
|
173
|
+
},
|
|
174
|
+
onExit: (exit) => {
|
|
175
|
+
console.log("Exit", exit);
|
|
176
|
+
},
|
|
177
|
+
onEvent: (event) => {
|
|
178
|
+
console.log("Event", event);
|
|
179
|
+
},
|
|
180
|
+
onLoad: () => {
|
|
181
|
+
console.log("Headless session loaded");
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
await session.start();
|
|
167
186
|
```
|
|
168
187
|
|
|
169
|
-
|
|
188
|
+
## Embedded Search
|
|
189
|
+
|
|
190
|
+
Embedded Search is available on iOS and Android through
|
|
191
|
+
`PlaidEmbeddedSearchView`.
|
|
192
|
+
|
|
193
|
+
```tsx
|
|
194
|
+
import { PlaidEmbeddedSearchView } from "react-native-plaid-link-sdk";
|
|
195
|
+
|
|
196
|
+
export function EmbeddedSearch() {
|
|
197
|
+
return (
|
|
198
|
+
<PlaidEmbeddedSearchView
|
|
199
|
+
token="#GENERATED_LINK_TOKEN#"
|
|
200
|
+
style={{ height: 500 }}
|
|
201
|
+
onLoad={() => {
|
|
202
|
+
console.log("Embedded Search loaded");
|
|
203
|
+
}}
|
|
204
|
+
onSuccess={(success) => {
|
|
205
|
+
console.log("Success", success);
|
|
206
|
+
}}
|
|
207
|
+
onExit={(exit) => {
|
|
208
|
+
console.log("Exit", exit);
|
|
209
|
+
}}
|
|
210
|
+
onEvent={(event) => {
|
|
211
|
+
console.log("Event", event);
|
|
212
|
+
}}
|
|
213
|
+
/>
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
```
|
|
170
217
|
|
|
171
|
-
|
|
172
|
-
It's especially useful if you're seeing unexpected behavior when calling `create()` multiple times — for example, if the phone number isn't submitting properly after multiple `create()` calls.
|
|
218
|
+
## FinanceKit
|
|
173
219
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
create(tokenConfiguration1)
|
|
177
|
-
create(tokenConfiguration2)
|
|
178
|
-
submit(phoneNumber) // <-- might not submit correctly
|
|
179
|
-
```
|
|
220
|
+
FinanceKit is available on iOS only. Calling `syncFinanceKit` on Android rejects
|
|
221
|
+
with an error.
|
|
180
222
|
|
|
181
|
-
#### Solution:
|
|
182
223
|
```ts
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
224
|
+
import {
|
|
225
|
+
FinanceKitSyncBehavior,
|
|
226
|
+
syncFinanceKit,
|
|
227
|
+
} from "react-native-plaid-link-sdk";
|
|
228
|
+
|
|
229
|
+
try {
|
|
230
|
+
await syncFinanceKit({
|
|
231
|
+
token: "#GENERATED_LINK_TOKEN#",
|
|
232
|
+
requestAuthorizationIfNeeded: true,
|
|
233
|
+
syncBehavior: FinanceKitSyncBehavior.LIVE,
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
console.log("FinanceKit sync complete");
|
|
237
|
+
} catch (error) {
|
|
238
|
+
console.log("FinanceKit error", error);
|
|
192
239
|
}
|
|
193
240
|
```
|
|
194
241
|
|
|
195
|
-
|
|
242
|
+
## Troubleshooting
|
|
196
243
|
|
|
197
|
-
|
|
244
|
+
### Expo Go cannot load the native module
|
|
198
245
|
|
|
199
|
-
|
|
246
|
+
Expo Go does not include Plaid Link's native code. Use an Expo development
|
|
247
|
+
build, another custom native runtime, or a bare React Native app.
|
|
200
248
|
|
|
201
|
-
|
|
249
|
+
### iOS build cannot find LinkKit
|
|
202
250
|
|
|
203
|
-
|
|
251
|
+
Run `npx pod-install` after installing or upgrading the package. v13 ships the
|
|
252
|
+
required `LinkKit.xcframework` in the npm package.
|
|
204
253
|
|
|
205
|
-
|
|
254
|
+
### Android OAuth redirects fail
|
|
206
255
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
| 12.7.0 | * | [5.5.0+] | 21 | 34 | >=6.4.2 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
223
|
-
| 12.6.1 | * | [5.4.0+] | 21 | 34 | >=6.4.2 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
224
|
-
| 12.6.0 | * | [5.4.0+] | 21 | 34 | >=6.4.1 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
225
|
-
| 12.5.3 | * | [5.3.4+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
226
|
-
| 12.5.2 | * | [5.3.3+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
227
|
-
| 12.5.1 | * | [5.3.2+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
228
|
-
| 12.5.0 | * | [5.3.2+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
229
|
-
| 12.4.0 | * | [5.3.0+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
230
|
-
| 12.3.2 | * | [5.2.0+] | 21 | 34 | >=6.3.2 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
231
|
-
| 12.3.1 | * | [5.2.0+] | 21 | 34 | >=6.3.1 | 14.0 | **Deprecated** |
|
|
232
|
-
| 12.3.0 | * | [5.2.0+] | 21 | 34 | >=6.3.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
233
|
-
| 12.2.1 | * | [5.1.1+] | 21 | 34 | >=6.2.1 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
234
|
-
| 12.2.0 | * | [5.1.1+] | 21 | 34 | >=6.2.1 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
235
|
-
| 12.1.1 | * | [5.0.0+] | 21 | 34 | >=6.1.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
236
|
-
| 12.1.0 | * | [5.0.0+] | 21 | 34 | >=6.1.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
237
|
-
| 12.0.3 | * | [5.0.0+] | 21 | 34 | >=6.0.4 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
238
|
-
| 12.0.2 | * | [5.0.0+] | 21 | 34 | >=6.0.2 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
239
|
-
| 12.0.1 | * | [5.0.0+] | 21 | 34 | >=6.0.2 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
240
|
-
| 12.0.0 | * | [5.0.0+] | 21 | 34 | >=6.0.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
241
|
-
| 12.0.0-beta.3 | * | [4.4.0+] | 21 | 34 | >=6.0.0 | 14.0 | Active, supports Xcode 15.3.0 |
|
|
242
|
-
| 12.0.0-beta.2 | * | [4.4.0+] | 21 | 34 | >=6.0.0 | 14.0 | Active, supports Xcode 15.3.0 |
|
|
243
|
-
| 12.0.0-beta.1 | * | [4.4.0+] | 21 | 34 | >=6.0.0 | 14.0 | **Deprecated** |
|
|
244
|
-
| 11.13.3 | * | [4.6.1+] | 21 | 34 | >=5.6.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
245
|
-
| 11.13.2 | * | [4.6.1+] | 21 | 34 | >=5.6.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
246
|
-
| 11.13.1 | * | [4.6.1+] | 21 | 34 | >=5.6.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
247
|
-
| 11.13.0 | * | [4.6.1+] | 21 | 34 | >=5.6.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
248
|
-
| 11.12.1 | * | [4.6.0+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
249
|
-
| 11.12.0 | * | [4.6.0+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
250
|
-
| 11.11.2 | * | [4.5.1+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
251
|
-
| 11.11.1 | * | [4.5.1+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
252
|
-
| 11.11.0 | * | [4.5.0+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
253
|
-
| 11.10.3 | * | [4.4.2+] | 21 | 34 | >=5.5.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
254
|
-
| 11.10.2 | * | [4.3.1+] | 21 | 34 | >=5.5.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
255
|
-
| 11.10.1 | * | [4.3.1+] | 21 | 34 | >=5.5.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
256
|
-
| 11.10.0 | * | [4.3.1+] | 21 | 34 | >=5.5.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
257
|
-
| 11.9.0 | * | [4.3.1+] | 21 | 34 | >=5.5.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
258
|
-
| 11.8.2 | * | [4.3.1+] | 21 | 34 | >=5.4.2 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
259
|
-
| 11.8.1 | * | [4.3.1+] | 21 | 34 | >=5.4.2 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
260
|
-
| 11.8.0 | * | [4.3.1+] | 21 | 34 | >=5.4.2 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
261
|
-
| 11.7.1 | * | [4.3.0+] | 21 | 34 | >=5.4.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
262
|
-
| 11.7.0 | * | [4.3.0+] | 21 | 34 | >=5.4.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
263
|
-
| 11.6.0 | * | [4.2.0+] | 21 | 34 | >=5.3.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
264
|
-
| 11.5.2 | * | [4.1.1+] | 21 | 34 | >=5.2.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
265
|
-
| 11.5.1 | * | [4.1.1+] | 21 | 34 | >=5.2.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
266
|
-
| 11.5.0 | * | [4.1.1+] | 21 | 34 | >=5.2.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
267
|
-
| 11.4.0 | * | [4.1.1+] | 21 | 34 | >=5.1.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
268
|
-
| 11.3.0 | * | [4.0.0+] | 21 | 34 | >=5.1.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
269
|
-
| ~11.2.0~ | * | [4.1.0+] | 21 | 34 | >=5.1.0 | 14.0 | **Deprecated** |
|
|
270
|
-
| 11.1.0 | * | [4.0.0+] | 21 | 34 | >=5.1.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
271
|
-
| 11.0.3 | * | [4.0.0+] | 21 | 34 | >=5.0.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
272
|
-
| 11.0.2 | * | [4.0.0+] | 21 | 34 | >=5.0.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
273
|
-
| 11.0.1 | * | [4.0.0+] | 21 | 34 | >=5.0.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
274
|
-
| 11.0.0 | * | [4.0.0+] | 21 | 34 | >=5.0.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
275
|
-
| 10.13.0 | >= 0.66.0 | [3.14.3+] | 21 | 33 | >=4.7.2 | 11.0 | Active, supports Xcode 14 |
|
|
276
|
-
| 10.12.0 | >= 0.66.0 | [3.14.3+] | 21 | 33 | >=4.7.1 | 11.0 | Active, supports Xcode 14 |
|
|
277
|
-
| 10.11.0 | >= 0.66.0 | [3.14.1+] | 21 | 33 | >=4.7.1 | 11.0 | Active, supports Xcode 14 |
|
|
278
|
-
| ~10.10.0~ | >= 0.66.0 | [3.14.2+] | 21 | 33 | >=4.7.1 | 11.0 | **Deprecated** |
|
|
279
|
-
| 10.9.1 | >= 0.66.0 | [3.14.1+] | 21 | 33 | >=4.7.0 | 11.0 | Active, supports Xcode 14 |
|
|
280
|
-
| 10.9.0 | >= 0.66.0 | [3.14.1+] | 21 | 33 | >=4.7.0 | 11.0 | Active, supports Xcode 14 |
|
|
281
|
-
| 10.8.0 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.7.0 | 11.0 | Active, supports Xcode 14 |
|
|
282
|
-
| 10.7.0 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Active, supports Xcode 14 |
|
|
283
|
-
| 10.6.4 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Active, supports Xcode 14 |
|
|
284
|
-
| 10.6.3 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Active, supports Xcode 14 |
|
|
285
|
-
| 10.6.2 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Deprecated, supports Xcode 14 |
|
|
286
|
-
| 10.6.0 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Deprecated, supports Xcode 14 |
|
|
287
|
-
| 10.5.0 | >= 0.66.0 | [3.13.2+] | 21 | 33 | >=4.5.1 | 11.0 | Deprecated, supports Xcode 14 |
|
|
288
|
-
| 10.4.0 | >= 0.66.0 | [3.13.2+] | 21 | 33 | >=4.4.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
289
|
-
| 10.3.0 | >= 0.66.0 | [3.12.1+] | 21 | 33 | >=4.3.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
290
|
-
| 10.2.0 | >= 0.66.0 | [3.12.0+] | 21 | 33 | >=4.3.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
291
|
-
| 10.1.0 | >= 0.66.0 | [3.11.0+] | 21 | 33 | >=4.2.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
292
|
-
| 10.0.0 | >= 0.66.0 | [3.10.1+] | 21 | 33 | >=4.1.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
293
|
-
| 9.1.0 | >= 0.65.3 | [3.13.2+] | 21 | 33 | >=4.4.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
294
|
-
| 9.0.1 | >= 0.65.3 | [3.10.1+] | 21 | 33 | >=4.1.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
295
|
-
| 9.0.0 | >= 0.65.3 | [3.10.1+] | 21 | 33 | >=4.1.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
256
|
+
Confirm that the Android package name in your app matches the package name
|
|
257
|
+
configured in the Plaid Dashboard for the environment you are testing.
|
|
258
|
+
|
|
259
|
+
### iOS OAuth redirects fail
|
|
260
|
+
|
|
261
|
+
Confirm that the iOS bundle identifier and redirect URI are configured in the
|
|
262
|
+
Plaid Dashboard for the environment you are testing.
|
|
263
|
+
|
|
264
|
+
### Import path fails after upgrading to v13
|
|
265
|
+
|
|
266
|
+
Import from the package root only:
|
|
267
|
+
|
|
268
|
+
```ts
|
|
269
|
+
import { createPlaidLinkSession } from "react-native-plaid-link-sdk";
|
|
270
|
+
```
|
|
296
271
|
|
|
272
|
+
Do not import from `build/`, `src/`, `ios/`, or `android/` directly.
|
|
297
273
|
|
|
298
274
|
## Contributing
|
|
299
275
|
|
|
300
|
-
|
|
276
|
+
Issues and pull requests are welcome in this repository. Include the SDK
|
|
277
|
+
version, React Native version, Expo SDK version if applicable, platform, device
|
|
278
|
+
or simulator, and Link Session ID when reporting bugs.
|