react-native-plaid-link-sdk 12.8.2 → 13.0.0

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.
Files changed (183) hide show
  1. package/.eslintrc.js +5 -0
  2. package/.gitattributes +3 -0
  3. package/.nvmrc +1 -0
  4. package/CHANGELOG.md +1458 -0
  5. package/README.md +17 -277
  6. package/V13_MIGRATION_GUIDE.md +470 -0
  7. package/android/build.gradle +30 -98
  8. package/android/src/main/AndroidManifest.xml +1 -8
  9. package/android/src/main/java/expo/modules/plaidlinksdk/PlaidEmbeddedResultDispatcher.kt +19 -0
  10. package/android/src/main/java/expo/modules/plaidlinksdk/PlaidResultMappers.kt +217 -0
  11. package/android/src/main/java/expo/modules/plaidlinksdk/RNPlaidLinkSdkVersion.kt +5 -0
  12. package/android/src/main/java/expo/modules/plaidlinksdk/ReactNativePlaidLinkSdkModule.kt +183 -0
  13. package/android/src/main/java/expo/modules/plaidlinksdk/ReactNativePlaidLinkSdkView.kt +69 -0
  14. package/build/PlaidEmbeddedSearchView.d.ts +12 -0
  15. package/build/PlaidEmbeddedSearchView.d.ts.map +1 -0
  16. package/build/PlaidEmbeddedSearchView.js +8 -0
  17. package/build/PlaidEmbeddedSearchView.js.map +1 -0
  18. package/{dist/src/Types.d.ts → build/ReactNativePlaidLinkSdk.types.d.ts} +78 -47
  19. package/build/ReactNativePlaidLinkSdk.types.d.ts.map +1 -0
  20. package/{dist/build → build}/ReactNativePlaidLinkSdk.types.js +82 -71
  21. package/build/ReactNativePlaidLinkSdk.types.js.map +1 -0
  22. package/build/ReactNativePlaidLinkSdkModule.d.ts +16 -0
  23. package/build/ReactNativePlaidLinkSdkModule.d.ts.map +1 -0
  24. package/{dist/build → build}/ReactNativePlaidLinkSdkModule.js +1 -1
  25. package/build/ReactNativePlaidLinkSdkModule.js.map +1 -0
  26. package/build/index.d.ts +13 -0
  27. package/build/index.d.ts.map +1 -0
  28. package/build/index.js +134 -0
  29. package/build/index.js.map +1 -0
  30. package/eslint.config.js +3 -0
  31. package/expo-module.config.json +9 -0
  32. package/ios/Frameworks/LinkKit.xcframework/Info.plist +61 -0
  33. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/LinkKit-Swift.h +327 -0
  34. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/LinkKit.h +22 -0
  35. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Info.plist +0 -0
  36. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/LinkKit +0 -0
  37. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.abi.json +53681 -0
  38. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.private.swiftinterface +756 -0
  39. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  40. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftinterface +756 -0
  41. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  42. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/module.modulemap +11 -0
  43. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/PrivacyInfo.xcprivacy +32 -0
  44. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/_CodeSignature/CodeResources +205 -0
  45. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Headers/LinkKit-Swift.h +650 -0
  46. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Headers/LinkKit.h +22 -0
  47. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/LinkKit +0 -0
  48. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.abi.json +52299 -0
  49. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface +751 -0
  50. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.swiftdoc +0 -0
  51. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.swiftinterface +751 -0
  52. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.swiftmodule +0 -0
  53. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.abi.json +52299 -0
  54. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface +751 -0
  55. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.swiftdoc +0 -0
  56. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.swiftinterface +751 -0
  57. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.swiftmodule +0 -0
  58. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/module.modulemap +11 -0
  59. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Resources/Info.plist +59 -0
  60. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Resources/PrivacyInfo.xcprivacy +32 -0
  61. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/_CodeSignature/CodeResources +230 -0
  62. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/LinkKit-Swift.h +650 -0
  63. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/LinkKit.h +22 -0
  64. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Info.plist +0 -0
  65. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/LinkKit +0 -0
  66. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.abi.json +53681 -0
  67. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +756 -0
  68. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  69. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +756 -0
  70. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule +0 -0
  71. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +53681 -0
  72. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +756 -0
  73. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  74. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +756 -0
  75. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule +0 -0
  76. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/module.modulemap +11 -0
  77. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/PrivacyInfo.xcprivacy +32 -0
  78. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/_CodeSignature/CodeResources +256 -0
  79. package/ios/ReactNativePlaidLinkSdk.podspec +31 -0
  80. package/ios/src/PlaidEmbeddedSearchView.swift +101 -0
  81. package/ios/src/RNPlaidLinkSdkVersion.swift +19 -0
  82. package/ios/src/ReactNativePlaidLinkSdkModule.swift +555 -0
  83. package/jest.config.js +21 -0
  84. package/jest.setup.js +7 -0
  85. package/package.json +32 -72
  86. package/scripts/check-package-entrypoints.js +146 -0
  87. package/scripts/extract-rn-enums.js +49 -0
  88. package/src/PlaidEmbeddedSearchView.tsx +35 -0
  89. package/src/ReactNativePlaidLinkSdk.types.ts +894 -0
  90. package/src/ReactNativePlaidLinkSdkModule.ts +31 -0
  91. package/src/index.ts +207 -22
  92. package/tsconfig.json +9 -0
  93. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  94. package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  95. package/android/gradle.properties +0 -31
  96. package/android/gradlew +0 -174
  97. package/android/gradlew.bat +0 -89
  98. package/android/src/main/java/com/plaid/ActivityResultHandler.java +0 -7
  99. package/android/src/main/java/com/plaid/ActivityResultManager.java +0 -15
  100. package/android/src/main/java/com/plaid/GlobalFunctions.kt +0 -42
  101. package/android/src/main/java/com/plaid/PLKEmbeddedView.kt +0 -161
  102. package/android/src/main/java/com/plaid/PLKEmbeddedViewManager.kt +0 -50
  103. package/android/src/main/java/com/plaid/PlaidModule.kt +0 -291
  104. package/android/src/main/java/com/plaid/PlaidPackage.java +0 -117
  105. package/android/src/main/java/com/plaid/gson/PlaidJsonConverter.kt +0 -94
  106. package/android/src/main/java/com/plaid/gson/RNAccountAdapter.kt +0 -48
  107. package/android/src/main/java/com/plaid/gson/RNEventMetadataAdapter.kt +0 -49
  108. package/android/src/main/java/com/plaid/gson/RNLinkInstitutionAdapter.kt +0 -34
  109. package/android/src/main/res/layout/plk_embedded_view.xml +0 -5
  110. package/android/src/paper/java/com/facebook/react/viewmanagers/PLKEmbeddedViewManagerDelegate.java +0 -35
  111. package/android/src/paper/java/com/facebook/react/viewmanagers/PLKEmbeddedViewManagerInterface.java +0 -18
  112. package/android/src/paper/java/com/plaid/NativePlaidLinkModuleAndroidSpec.java +0 -64
  113. package/android/src/paper/java/com/plaid/NativePlaidLinkModuleiOSSpec.java +0 -59
  114. package/dist/build/EmbeddedLink/EmbeddedLinkView.d.ts +0 -2
  115. package/dist/build/EmbeddedLink/EmbeddedLinkView.js +0 -56
  116. package/dist/build/EmbeddedLink/EmbeddedLinkView.web.d.ts +0 -1
  117. package/dist/build/EmbeddedLink/EmbeddedLinkView.web.js +0 -2
  118. package/dist/build/EmbeddedLink/NativeEmbeddedLinkView.d.ts +0 -2
  119. package/dist/build/EmbeddedLink/NativeEmbeddedLinkView.js +0 -3
  120. package/dist/build/PlaidEmbeddedSearchView.d.ts +0 -2
  121. package/dist/build/PlaidEmbeddedSearchView.js +0 -25
  122. package/dist/build/PlaidLink.d.ts +0 -7
  123. package/dist/build/PlaidLink.js +0 -137
  124. package/dist/build/ReactNativePlaidLinkSdk.types.d.ts +0 -108
  125. package/dist/build/ReactNativePlaidLinkSdkModule.d.ts +0 -2
  126. package/dist/build/ReactNativePlaidLinkSdkView.d.ts +0 -2
  127. package/dist/build/ReactNativePlaidLinkSdkView.js +0 -7
  128. package/dist/build/Types.d.ts +0 -108
  129. package/dist/build/Types.js +0 -462
  130. package/dist/build/fabric/EmbeddedLinkViewNativeComponent.d.ts +0 -2
  131. package/dist/build/fabric/EmbeddedLinkViewNativeComponent.js +0 -3
  132. package/dist/build/fabric/NativePlaidLinkModuleAndroid.d.ts +0 -2
  133. package/dist/build/fabric/NativePlaidLinkModuleAndroid.js +0 -5
  134. package/dist/build/fabric/NativePlaidLinkModuleiOS.d.ts +0 -2
  135. package/dist/build/fabric/NativePlaidLinkModuleiOS.js +0 -5
  136. package/dist/build/fabric/fabricUtils.d.ts +0 -1
  137. package/dist/build/fabric/fabricUtils.js +0 -2
  138. package/dist/build/index.d.ts +0 -14
  139. package/dist/build/index.js +0 -154
  140. package/dist/src/EmbeddedLink/EmbeddedLinkView.d.ts +0 -13
  141. package/dist/src/EmbeddedLink/EmbeddedLinkView.js +0 -55
  142. package/dist/src/EmbeddedLink/EmbeddedLinkView.web.d.ts +0 -1
  143. package/dist/src/EmbeddedLink/EmbeddedLinkView.web.js +0 -1
  144. package/dist/src/EmbeddedLink/NativeEmbeddedLinkView.d.ts +0 -2
  145. package/dist/src/EmbeddedLink/NativeEmbeddedLinkView.js +0 -2
  146. package/dist/src/PlaidLink.d.ts +0 -34
  147. package/dist/src/PlaidLink.js +0 -136
  148. package/dist/src/Types.js +0 -463
  149. package/dist/src/__tests__/Types.tests.d.ts +0 -1
  150. package/dist/src/__tests__/Types.tests.js +0 -14
  151. package/dist/src/fabric/EmbeddedLinkViewNativeComponent.d.ts +0 -15
  152. package/dist/src/fabric/EmbeddedLinkViewNativeComponent.js +0 -2
  153. package/dist/src/fabric/NativePlaidLinkModuleAndroid.d.ts +0 -15
  154. package/dist/src/fabric/NativePlaidLinkModuleAndroid.js +0 -4
  155. package/dist/src/fabric/NativePlaidLinkModuleiOS.d.ts +0 -15
  156. package/dist/src/fabric/NativePlaidLinkModuleiOS.js +0 -4
  157. package/dist/src/fabric/fabricUtils.d.ts +0 -1
  158. package/dist/src/fabric/fabricUtils.js +0 -1
  159. package/dist/src/index.d.ts +0 -4
  160. package/dist/src/index.js +0 -5
  161. package/ios/PLKEmbeddedView.m +0 -7
  162. package/ios/PLKEmbeddedView.swift +0 -116
  163. package/ios/PLKEmbeddedViewComponentView.h +0 -28
  164. package/ios/PLKEmbeddedViewComponentView.mm +0 -91
  165. package/ios/PLKEmbeddedViewManager.swift +0 -14
  166. package/ios/PLKFabricHelpers.h +0 -116
  167. package/ios/RNLinksdk-Bridging-Header.h +0 -8
  168. package/ios/RNLinksdk.h +0 -19
  169. package/ios/RNLinksdk.mm +0 -732
  170. package/ios/RNPlaidHelper.h +0 -15
  171. package/ios/RNPlaidHelper.m +0 -33
  172. package/ios/react_native_plaid_link_sdk.h +0 -2
  173. package/react-native-plaid-link-sdk.podspec +0 -40
  174. package/src/EmbeddedLink/EmbeddedLinkView.tsx +0 -95
  175. package/src/EmbeddedLink/EmbeddedLinkView.web.tsx +0 -5
  176. package/src/EmbeddedLink/NativeEmbeddedLinkView.tsx +0 -3
  177. package/src/PlaidLink.tsx +0 -167
  178. package/src/Types.ts +0 -634
  179. package/src/__tests__/Types.tests.ts +0 -15
  180. package/src/fabric/EmbeddedLinkViewNativeComponent.ts +0 -24
  181. package/src/fabric/NativePlaidLinkModuleAndroid.ts +0 -32
  182. package/src/fabric/NativePlaidLinkModuleiOS.ts +0 -33
  183. package/src/fabric/fabricUtils.ts +0 -2
package/README.md CHANGED
@@ -1,299 +1,39 @@
1
1
  # Plaid React Native SDK
2
2
 
3
- ![version](https://img.shields.io/npm/v/react-native-plaid-link-sdk)
4
- [![License](https://img.shields.io/github/license/plaid/react-native-plaid-link-sdk)](https://github.com/plaid/react-native-plaid-link-sdk/blob/master/LICENSE)
3
+ React Native SDK for Plaid Link, built on Expo Modules for the v13 native architecture.
5
4
 
6
- The Plaid React Native SDK provides the client-side component that your users will interact with in order to link their accounts to Plaid and allow you access to their accounts via the Plaid API.
5
+ ## API documentation
7
6
 
8
- For more information about Plaid Link check out our
9
- [introduction documentation](https://plaid.com/docs/link/#introduction-to-link).
7
+ - [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/react-native-plaid-link-sdk/)
8
+ - [Documentation for the main branch](https://docs.expo.dev/versions/unversioned/sdk/react-native-plaid-link-sdk/)
10
9
 
11
- Plaid currently supports two versions of the Plaid React Native SDK v10.x and v11.x. You can find v10 on the [master-v10](https://github.com/plaid/react-native-plaid-link-sdk/tree/master-v10) branch.
12
-
13
- ## Features
14
-
15
- The SDK provides:
16
-
17
- - A PlaidLink functional component.
18
- - A function to open Link.
19
- - A hook to handle [onEvent](https://plaid.com/docs/link/react-native/#onevent) callbacks.
20
- - A function to dismiss link on iOS.
10
+ ## Migration guides
21
11
 
22
- ## Getting Started
12
+ - [v13 migration guide](./V13_MIGRATION_GUIDE.md)
23
13
 
24
- Get started with our 📝 [documentation](https://plaid.com/docs/link/react-native/) and the 📱[example project](https://github.com/plaid/react-native-plaid-link-sdk/blob/master/example/README.md), or ↔️ [Tiny Quickstart (React Native)](https://github.com/plaid/tiny-quickstart/tree/main/react_native) which is an end to end example demonstrating a minimal integration with this SDK.
14
+ ## Installation
25
15
 
26
- If you're unfamiliar with React Native we recommend starting with the [environment setup instructions](https://reactnative.dev/docs/environment-setup).
16
+ ### Expo projects
27
17
 
28
- In your React Native project directory:
18
+ Install the package and run the app in a development build or another custom native runtime. Expo Go cannot load custom native modules.
29
19
 
30
20
  ```sh
31
- npm install --save react-native-plaid-link-sdk
21
+ npm install react-native-plaid-link-sdk
32
22
  ```
33
23
 
34
- ### iOS Setup
24
+ ### Bare React Native projects
35
25
 
36
- Autolinking should install the CocoaPods dependencies for iOS project. If it fails you can run
26
+ Bare React Native apps must install and configure the [`expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before using this SDK.
37
27
 
38
28
  ```sh
39
- cd ios && bundle install && bundle exec pod install
40
- ```
41
-
42
- ### Android Setup
43
-
44
- - Android 5.0 (API level 21) and above.
45
- - Your `compileSdkVersion` must be `33`.
46
- - Android gradle plugin `4.x` and above.
47
-
48
- AutoLinking should handle all of the Android setup.
49
-
50
- Remember to register your Android package name in the [Dashboard](https://dashboard.plaid.com/developers/api). This is required in order to connect to OAuth institutions (which includes most major banks).
51
-
52
- ### React Native Setup
53
-
54
- - To initialize `PlaidLink`, you will need to first create a `link_token` at [/link/token/create](https://plaid.com/docs/api/link/#linktokencreate). Check out our [QuickStart guide](https://plaid.com/docs/quickstart/#introduction) for additional API information.
55
-
56
- #### Version >= 11.6.0
57
-
58
- Starting from version `11.6.0`, we introduced the ability to preload part of the Link experience. You can initiate the preloading process by invoking the `create` function.
59
-
60
- ```typescript
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
-
72
- const tokenConfiguration = createLinkTokenConfiguration("#GENERATED_LINK_TOKEN#");
73
- create(tokenConfiguration);
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
- }
95
-
96
- const openProps = createLinkOpenProps();
97
- open(openProps);
98
- ```
99
-
100
- #### Version < 11.6.0
101
-
102
- In versions prior to `11.6.0`, you can open a link by calling the `openLink` function.
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
- ```
132
-
133
- #### OAuth requirements
134
-
135
- :warning: All integrations must use version 9.0.0 or later of the React Native SDK (requires version 4.1.0 or later of the iOS LinkKit SDK) to maintain support for Chase OAuth on iOS.
136
-
137
- ##### Android OAuth Requirements
138
-
139
- ###### Register your app package name
140
- 1. Log into your [Plaid Dashboard](https://dashboard.plaid.com/developers/api) and navigate to the API page under the Developers tab.
141
- 2. Next to Allowed Android package names click "Configure" then "Add New Android Package Name".
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.
144
-
145
- ##### iOS OAuth Requirements
146
-
147
- For iOS OAuth to work, specific requirements must be met.
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.
150
-
151
-
152
- ##### Link Token OAuth Requirements
153
-
154
- - On iOS you must configure your `link_token` with a [redirect_uri](https://plaid.com/docs/api/link/#link-token-create-request-redirect-uri) to support OAuth. When creating a `link_token` for initializing Link on Android, `android_package_name` must be specified and `redirect_uri` must be left blank.
155
-
156
- - On Android you must configure your `link_token` with an [android_package_name](https://plaid.com/docs/api/link/#link-token-create-request-android-package-name) to support OAuth. When creating a `link_token` for initializing Link on iOS, `android_package_name` must be left blank and `redirect_uri` should be used instead.
157
-
158
-
159
- #### To receive onEvent callbacks:
160
-
161
- The React Native Plaid module emits `onEvent` events throughout the account linking process — see [details here](https://plaid.com/docs/link/react-native/#onevent). To receive these events in your React Native app, use the `usePlaidEmitter` hook in react functional components:
162
-
163
- ```javascript
164
- usePlaidEmitter((event: LinkEvent) => {
165
- console.log(event)
166
- })
29
+ npm install react-native-plaid-link-sdk
30
+ npx pod-install
167
31
  ```
168
32
 
169
- #### Clearing Previous Session State with `destroy()`
170
-
171
- The `destroy()` method clears state and resources from a previously opened session.
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.
173
-
174
- #### Problem scenario:
175
- ```ts
176
- create(tokenConfiguration1)
177
- create(tokenConfiguration2)
178
- submit(phoneNumber) // <-- might not submit correctly
179
- ```
180
-
181
- #### Solution:
182
- ```ts
183
- create(tokenConfiguration1)
184
- async () => {
185
- try {
186
- await destroy(); // Clear previous session state
187
- create(tokenConfiguration2);
188
- submit(phoneNumber);
189
- } catch (e) {
190
- console.error('Error during flow:', e);
191
- }
192
- }
193
- ```
194
-
195
- By calling destroy() before the second create(), you ensure a clean state, preventing issues like failed phone number submissions.
196
-
197
- ## Upgrading
198
-
199
- Plaid releases updates to the SDK approximately every few months. For the best user experience, we recommend using the latest version of the SDK.
200
-
201
- Major SDK versions are released annually. SDK versions are supported for two years; with each major SDK release, Plaid will stop officially supporting any previous SDK versions that are more than two years old.
202
-
203
- While these older versions are expected to continue to work without disruption, Plaid will not provide assistance with unsupported SDK versions.
204
-
205
- ## Migration guides
206
-
207
- 11.x->12.x:
208
- - Removed the `PlaidLink` component and `openLink` function, which were deprecated in version 11.6.0. If you are using this method of opening Link, replace it with the new process that uses `create` and then `open`. For sample code, see [Version 11.6](https://github.com/plaid/react-native-plaid-link-sdk?tab=readme-ov-file#version--1160) or the [Plaid React Native Link docs](https://plaid.com/docs/link/react-native).
209
- - Also see [Version compatibility table](#version-compatibility) for required toolchain updates.
210
- 9.x/10.x-> 11.x: See [React Native SDK 11 Migration Guide](https://github.com/plaid/react-native-plaid-link-sdk/blob/master/v11-migration-guide.md)
211
-
212
- If migrating from older versions, see the [docs](https://plaid.com/docs/link/react-native/#migration-guides) for more information.
213
-
214
- ## Version compatibility
215
-
216
- | Plaid SDK Version | Min React Native Version | Android SDK | Android Min Version | Android Compile Version| iOS SDK | iOS Min Version | Status |
217
- |-------------------|--------------------------|-------------|---------------------|------------------------|---------|-----------------|-------------------------------|
218
- | 12.8.2 | * | [5.5.1+] | 21 | 34 | >=6.4.3 | 14.0 | Active, supports Xcode 16.1.0 |
219
- | 12.8.1 | * | [5.5.2+] | 21 | 34 | >=6.4.3 | 14.0 | Active, supports Xcode 16.1.0 |
220
- | 12.8.0 | * | [5.5.1+] | 21 | 34 | >=6.4.3 | 14.0 | Active, supports Xcode 16.1.0 |
221
- | 12.7.0 | * | [5.5.0+] | 21 | 34 | >=6.4.2 | 14.0 | Active, supports Xcode 16.1.0 |
222
- | 12.6.1 | * | [5.4.0+] | 21 | 34 | >=6.4.2 | 14.0 | Active, supports Xcode 16.1.0 |
223
- | 12.6.0 | * | [5.4.0+] | 21 | 34 | >=6.4.1 | 14.0 | Active, supports Xcode 16.1.0 |
224
- | 12.5.3 | * | [5.3.4+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
225
- | 12.5.2 | * | [5.3.3+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
226
- | 12.5.1 | * | [5.3.2+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
227
- | 12.5.0 | * | [5.3.2+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
228
- | 12.4.0 | * | [5.3.0+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
229
- | 12.3.2 | * | [5.2.0+] | 21 | 34 | >=6.3.2 | 14.0 | Active, supports Xcode 16.1.0 |
230
- | 12.3.1 | * | [5.2.0+] | 21 | 34 | >=6.3.1 | 14.0 | **Deprecated** |
231
- | 12.3.0 | * | [5.2.0+] | 21 | 34 | >=6.3.0 | 14.0 | Active, supports Xcode 16.1.0 |
232
- | 12.2.1 | * | [5.1.1+] | 21 | 34 | >=6.2.1 | 14.0 | Active, supports Xcode 16.1.0 |
233
- | 12.2.0 | * | [5.1.1+] | 21 | 34 | >=6.2.1 | 14.0 | Active, supports Xcode 16.1.0 |
234
- | 12.1.1 | * | [5.0.0+] | 21 | 34 | >=6.1.0 | 14.0 | Active, supports Xcode 16.1.0 |
235
- | 12.1.0 | * | [5.0.0+] | 21 | 34 | >=6.1.0 | 14.0 | Active, supports Xcode 16.1.0 |
236
- | 12.0.3 | * | [5.0.0+] | 21 | 34 | >=6.0.4 | 14.0 | Active, supports Xcode 16.1.0 |
237
- | 12.0.2 | * | [5.0.0+] | 21 | 34 | >=6.0.2 | 14.0 | Active, supports Xcode 16.1.0 |
238
- | 12.0.1 | * | [5.0.0+] | 21 | 34 | >=6.0.2 | 14.0 | Active, supports Xcode 16.1.0 |
239
- | 12.0.0 | * | [5.0.0+] | 21 | 34 | >=6.0.0 | 14.0 | Active, supports Xcode 16.1.0 |
240
- | 12.0.0-beta.3 | * | [4.4.0+] | 21 | 34 | >=6.0.0 | 14.0 | Active, supports Xcode 15.3.0 |
241
- | 12.0.0-beta.2 | * | [4.4.0+] | 21 | 34 | >=6.0.0 | 14.0 | Active, supports Xcode 15.3.0 |
242
- | 12.0.0-beta.1 | * | [4.4.0+] | 21 | 34 | >=6.0.0 | 14.0 | **Deprecated** |
243
- | 11.13.3 | * | [4.6.1+] | 21 | 34 | >=5.6.1 | 14.0 | Active, supports Xcode 15.0.1 |
244
- | 11.13.2 | * | [4.6.1+] | 21 | 34 | >=5.6.1 | 14.0 | Active, supports Xcode 15.0.1 |
245
- | 11.13.1 | * | [4.6.1+] | 21 | 34 | >=5.6.1 | 14.0 | Active, supports Xcode 15.0.1 |
246
- | 11.13.0 | * | [4.6.1+] | 21 | 34 | >=5.6.1 | 14.0 | Active, supports Xcode 15.0.1 |
247
- | 11.12.1 | * | [4.6.0+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
248
- | 11.12.0 | * | [4.6.0+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
249
- | 11.11.2 | * | [4.5.1+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
250
- | 11.11.1 | * | [4.5.1+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
251
- | 11.11.0 | * | [4.5.0+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
252
- | 11.10.3 | * | [4.4.2+] | 21 | 34 | >=5.5.1 | 14.0 | Active, supports Xcode 15.0.1 |
253
- | 11.10.2 | * | [4.3.1+] | 21 | 34 | >=5.5.1 | 14.0 | Active, supports Xcode 15.0.1 |
254
- | 11.10.1 | * | [4.3.1+] | 21 | 34 | >=5.5.0 | 14.0 | Active, supports Xcode 15.0.1 |
255
- | 11.10.0 | * | [4.3.1+] | 21 | 34 | >=5.5.0 | 14.0 | Active, supports Xcode 15.0.1 |
256
- | 11.9.0 | * | [4.3.1+] | 21 | 34 | >=5.5.0 | 14.0 | Active, supports Xcode 15.0.1 |
257
- | 11.8.2 | * | [4.3.1+] | 21 | 34 | >=5.4.2 | 14.0 | Active, supports Xcode 15.0.1 |
258
- | 11.8.1 | * | [4.3.1+] | 21 | 34 | >=5.4.2 | 14.0 | Active, supports Xcode 15.0.1 |
259
- | 11.8.0 | * | [4.3.1+] | 21 | 34 | >=5.4.2 | 14.0 | Active, supports Xcode 15.0.1 |
260
- | 11.7.1 | * | [4.3.0+] | 21 | 34 | >=5.4.1 | 14.0 | Active, supports Xcode 15.0.1 |
261
- | 11.7.0 | * | [4.3.0+] | 21 | 34 | >=5.4.0 | 14.0 | Active, supports Xcode 15.0.1 |
262
- | 11.6.0 | * | [4.2.0+] | 21 | 34 | >=5.3.1 | 14.0 | Active, supports Xcode 15.0.1 |
263
- | 11.5.2 | * | [4.1.1+] | 21 | 34 | >=5.2.1 | 14.0 | Active, supports Xcode 15.0.1 |
264
- | 11.5.1 | * | [4.1.1+] | 21 | 34 | >=5.2.0 | 14.0 | Active, supports Xcode 15.0.1 |
265
- | 11.5.0 | * | [4.1.1+] | 21 | 34 | >=5.2.0 | 14.0 | Active, supports Xcode 15.0.1 |
266
- | 11.4.0 | * | [4.1.1+] | 21 | 34 | >=5.1.0 | 14.0 | Active, supports Xcode 15.0.1 |
267
- | 11.3.0 | * | [4.0.0+] | 21 | 34 | >=5.1.0 | 14.0 | Active, supports Xcode 15.0.1 |
268
- | ~11.2.0~ | * | [4.1.0+] | 21 | 34 | >=5.1.0 | 14.0 | **Deprecated** |
269
- | 11.1.0 | * | [4.0.0+] | 21 | 34 | >=5.1.0 | 14.0 | Active, supports Xcode 15.0.1 |
270
- | 11.0.3 | * | [4.0.0+] | 21 | 34 | >=5.0.0 | 14.0 | Active, supports Xcode 15.0.1 |
271
- | 11.0.2 | * | [4.0.0+] | 21 | 34 | >=5.0.0 | 14.0 | Active, supports Xcode 15.0.1 |
272
- | 11.0.1 | * | [4.0.0+] | 21 | 34 | >=5.0.0 | 14.0 | Active, supports Xcode 15.0.1 |
273
- | 11.0.0 | * | [4.0.0+] | 21 | 34 | >=5.0.0 | 14.0 | Active, supports Xcode 15.0.1 |
274
- | 10.13.0 | >= 0.66.0 | [3.14.3+] | 21 | 33 | >=4.7.2 | 11.0 | Active, supports Xcode 14 |
275
- | 10.12.0 | >= 0.66.0 | [3.14.3+] | 21 | 33 | >=4.7.1 | 11.0 | Active, supports Xcode 14 |
276
- | 10.11.0 | >= 0.66.0 | [3.14.1+] | 21 | 33 | >=4.7.1 | 11.0 | Active, supports Xcode 14 |
277
- | ~10.10.0~ | >= 0.66.0 | [3.14.2+] | 21 | 33 | >=4.7.1 | 11.0 | **Deprecated** |
278
- | 10.9.1 | >= 0.66.0 | [3.14.1+] | 21 | 33 | >=4.7.0 | 11.0 | Active, supports Xcode 14 |
279
- | 10.9.0 | >= 0.66.0 | [3.14.1+] | 21 | 33 | >=4.7.0 | 11.0 | Active, supports Xcode 14 |
280
- | 10.8.0 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.7.0 | 11.0 | Active, supports Xcode 14 |
281
- | 10.7.0 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Active, supports Xcode 14 |
282
- | 10.6.4 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Active, supports Xcode 14 |
283
- | 10.6.3 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Active, supports Xcode 14 |
284
- | 10.6.2 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Deprecated, supports Xcode 14 |
285
- | 10.6.0 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Deprecated, supports Xcode 14 |
286
- | 10.5.0 | >= 0.66.0 | [3.13.2+] | 21 | 33 | >=4.5.1 | 11.0 | Deprecated, supports Xcode 14 |
287
- | 10.4.0 | >= 0.66.0 | [3.13.2+] | 21 | 33 | >=4.4.0 | 11.0 | Deprecated, supports Xcode 14 |
288
- | 10.3.0 | >= 0.66.0 | [3.12.1+] | 21 | 33 | >=4.3.0 | 11.0 | Deprecated, supports Xcode 14 |
289
- | 10.2.0 | >= 0.66.0 | [3.12.0+] | 21 | 33 | >=4.3.0 | 11.0 | Deprecated, supports Xcode 14 |
290
- | 10.1.0 | >= 0.66.0 | [3.11.0+] | 21 | 33 | >=4.2.0 | 11.0 | Deprecated, supports Xcode 14 |
291
- | 10.0.0 | >= 0.66.0 | [3.10.1+] | 21 | 33 | >=4.1.0 | 11.0 | Deprecated, supports Xcode 14 |
292
- | 9.1.0 | >= 0.65.3 | [3.13.2+] | 21 | 33 | >=4.4.0 | 11.0 | Deprecated, supports Xcode 14 |
293
- | 9.0.1 | >= 0.65.3 | [3.10.1+] | 21 | 33 | >=4.1.0 | 11.0 | Deprecated, supports Xcode 14 |
294
- | 9.0.0 | >= 0.65.3 | [3.10.1+] | 21 | 33 | >=4.1.0 | 11.0 | Deprecated, supports Xcode 14 |
33
+ ### Platform setup
295
34
 
35
+ Configure Android package names, iOS bundle identifiers, and OAuth redirect settings in the Plaid Dashboard for the environments your app supports.
296
36
 
297
37
  ## Contributing
298
38
 
299
- See the [contributor guidelines](CONTRIBUTING.md) to learn how to contribute to the repository.
39
+ Issues and pull requests are welcome in this repository.