react-native-plaid-link-sdk 12.8.7 → 12.8.9

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 (38) hide show
  1. package/CHANGELOG.md +63 -1
  2. package/README.md +2 -0
  3. package/android/src/main/AndroidManifest.xml +1 -1
  4. package/dist/src/PlaidLink.js +1 -4
  5. package/dist/src/Types.d.ts +42 -2
  6. package/dist/src/Types.js +12 -0
  7. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/LinkKit-Swift.h +13 -0
  8. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/PLKPlaid.h +49 -0
  9. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Info.plist +0 -0
  10. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/LinkKit +0 -0
  11. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.abi.json +1682 -429
  12. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.private.swiftinterface +29 -0
  13. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  14. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftinterface +29 -0
  15. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  16. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Threads_Threads.bundle/Info.plist +0 -0
  17. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/_CodeSignature/CodeResources +17 -17
  18. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/LinkKit-Swift.h +26 -0
  19. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/PLKPlaid.h +49 -0
  20. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Info.plist +0 -0
  21. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/LinkKit +0 -0
  22. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.abi.json +1682 -429
  23. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +29 -0
  24. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  25. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +29 -0
  26. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule +0 -0
  27. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +1682 -429
  28. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +29 -0
  29. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  30. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +29 -0
  31. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule +0 -0
  32. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Threads_Threads.bundle/Info.plist +0 -0
  33. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/_CodeSignature/CodeResources +27 -27
  34. package/ios/RNLinksdk.mm +14 -4
  35. package/package.json +1 -1
  36. package/src/PlaidLink.tsx +1 -4
  37. package/src/Types.ts +54 -2
  38. package/src/__tests__/FinanceKitErrors.tests.js +60 -0
package/CHANGELOG.md CHANGED
@@ -1,9 +1,58 @@
1
1
  # RELEASES
2
2
 
3
- ## Unreleased
3
+ ## LinkKit V12.8.9 — 2026-11-10
4
+
5
+ #### Requirements
6
+
7
+ This SDK works with any supported version of React Native.
8
+
9
+ ### Changes
10
+
11
+ - Upgrade the bundled iOS SDK to LinkKit 6.5.8.
12
+ - Android SDK stays at version 5.5.6.
13
+ - `FinanceKitErrorType` gains `NoAccounts`, `SyncFailed`,
14
+ `PermissionNotRequested`, `DataUnavailable`, `ChannelClosed` and
15
+ `SyncTimedOut`, the errors LinkKit 6.5.8 adds to `syncFinanceKit`. A
16
+ `SyncFailed` error also carries the server's `errorType` and `errorCode`.
17
+ Code that switches exhaustively over `FinanceKitError` needs the new cases.
18
+
19
+ ### Android
20
+
21
+ Android SDK [5.5.6](https://github.com/plaid/plaid-link-android/releases/tag/v5.5.6) (unchanged)
22
+
23
+ ### iOS
24
+
25
+ iOS SDK [6.5.8](https://github.com/plaid/plaid-link-ios/releases/tag/6.5.8)
26
+
27
+ ### Changes
28
+
29
+ - `syncFinanceKit` fails with `NoAccounts` when Apple shared no accounts with
30
+ your app; it used to complete successfully.
31
+ - `syncFinanceKit` completes with `ChannelClosed` or `SyncTimedOut` when the
32
+ server closes the sync, or it times out, before it finishes; the callback
33
+ used to never fire.
34
+ - `PermissionNotRequested` replaces `PermissionAccessError` when
35
+ `requestAuthorizationIfNeeded` is `false` and the user was never asked.
36
+ - `DataUnavailable` is reported on a device, region or OS version that cannot
37
+ provide Wallet data, including an iPad running an iPhone app.
38
+ - A FinanceKit authorization failure is reported as `PermissionError` instead
39
+ of `Unknown`.
40
+ - Any other failure the server reports is delivered as `SyncFailed`.
41
+ - A sync holds an iOS background task once the permission prompt is answered,
42
+ so it keeps running for about 30 seconds after the user leaves the app.
43
+ - Link asks once more when the user leaves Apple's permission sheet without
44
+ choosing.
45
+
46
+ ## LinkKit V12.8.8 — 2026-10-30
47
+
48
+ #### Requirements
49
+
50
+ This SDK works with any supported version of React Native.
4
51
 
5
52
  ### Changes
6
53
 
54
+ - Upgrade the bundled iOS SDK to LinkKit 6.5.7.
55
+ - Android SDK stays at version 5.5.6.
7
56
  - Keep build output and tooling out of the npm tarball. `package.json`
8
57
  `files` now lists the Android and iOS sources explicitly instead of
9
58
  `android/**/*` and `ios/**/*`, so local `android/build` output can no longer
@@ -12,6 +61,19 @@
12
61
  are packed, and `npm run publish:dry-run` uses the `old-version` dist-tag
13
62
  that 12.x releases publish under.
14
63
 
64
+ ### Android
65
+
66
+ Android SDK [5.5.6](https://github.com/plaid/plaid-link-android/releases/tag/v5.5.6) (unchanged)
67
+
68
+ ### iOS
69
+
70
+ iOS SDK [6.5.7](https://github.com/plaid/plaid-link-ios/releases/tag/6.5.7)
71
+
72
+ ### Changes
73
+
74
+ - Logging updates (6.5.7).
75
+ - Fix a memory leak (6.5.6).
76
+
15
77
  ## LinkKit V12.8.7 — 2026-10-21
16
78
 
17
79
  #### Requirements
package/README.md CHANGED
@@ -217,6 +217,8 @@ If migrating from older versions, see the [docs](https://plaid.com/docs/link/rea
217
217
 
218
218
  | Plaid SDK Version | Min React Native Version | Android SDK | Android Min Version | Android Compile Version| iOS SDK | iOS Min Version | Status |
219
219
  |-------------------|--------------------------|-------------|---------------------|------------------------|---------|-----------------|-------------------------------|
220
+ | 12.8.9 | * | [5.5.6+] | 21 | 34 | 6.5.8 (bundled) | 14.0 | Active, supports Xcode 16.1.0 |
221
+ | 12.8.8 | * | [5.5.6+] | 21 | 34 | 6.5.7 (bundled) | 14.0 | Active, supports Xcode 16.1.0 |
220
222
  | 12.8.7 | * | [5.5.6+] | 21 | 34 | 6.5.5 (bundled) | 14.0 | Active, supports Xcode 16.1.0 |
221
223
  | 12.8.6 | * | [5.5.6+] | 21 | 34 | 6.5.4 (bundled) | 14.0 | Active, supports Xcode 16.1.0 |
222
224
  | 12.8.5 | * | [5.5.3+] | 21 | 34 | >=6.5.0 | 14.0 | Active, supports Xcode 16.1.0 |
@@ -3,7 +3,7 @@
3
3
  <application>
4
4
  <meta-data
5
5
  android:name="com.plaid.link.react_native"
6
- android:value="12.8.7" />
6
+ android:value="12.8.9" />
7
7
  </application>
8
8
 
9
9
  </manifest>
@@ -130,10 +130,7 @@ export const syncFinanceKit = (token, requestAuthorizationIfNeeded, simulatedBeh
130
130
  RNLinksdkiOS === null || RNLinksdkiOS === void 0 ? void 0 : RNLinksdkiOS.syncFinanceKit(token, requestAuthorizationIfNeeded, simulatedBehavior, () => {
131
131
  completion();
132
132
  }, (error) => {
133
- completion({
134
- type: error.type,
135
- message: error.message,
136
- });
133
+ completion(error);
137
134
  });
138
135
  }
139
136
  };
@@ -525,7 +525,19 @@ export declare enum FinanceKitErrorType {
525
525
  PermissionError = 1,
526
526
  LinkApiError = 2,
527
527
  PermissionAccessError = 3,
528
- Unknown = 4
528
+ Unknown = 4,
529
+ /** The sync ended because Apple returned no accounts shared with this app. */
530
+ NoAccounts = 5,
531
+ /** The server ended the sync with another API error, given in `errorType` and `errorCode`. */
532
+ SyncFailed = 6,
533
+ /** FinanceKit access has not been requested yet and the sync was told not to request it. */
534
+ PermissionNotRequested = 7,
535
+ /** This device, region or OS version cannot provide FinanceKit data. The sync did not start. */
536
+ DataUnavailable = 8,
537
+ /** The server closed the sync before it completed. Start a new sync to retry. */
538
+ ChannelClosed = 9,
539
+ /** iOS was about to suspend the app, or an hour passed, before the sync finished. */
540
+ SyncTimedOut = 10
529
541
  }
530
542
  interface InvalidTokenError {
531
543
  type: FinanceKitErrorType.InvalidToken;
@@ -547,7 +559,35 @@ interface UnknownError {
547
559
  type: FinanceKitErrorType.Unknown;
548
560
  message: string;
549
561
  }
550
- export type FinanceKitError = InvalidTokenError | PermissionError | LinkApiError | PermissionAccessError | UnknownError;
562
+ interface NoAccountsError {
563
+ type: FinanceKitErrorType.NoAccounts;
564
+ message: string;
565
+ }
566
+ interface SyncFailedError {
567
+ type: FinanceKitErrorType.SyncFailed;
568
+ message: string;
569
+ /** The API error type the server ended the sync with, for example `ITEM_ERROR`. */
570
+ errorType: string;
571
+ /** The API error code the server ended the sync with. */
572
+ errorCode: string;
573
+ }
574
+ interface PermissionNotRequestedError {
575
+ type: FinanceKitErrorType.PermissionNotRequested;
576
+ message: string;
577
+ }
578
+ interface DataUnavailableError {
579
+ type: FinanceKitErrorType.DataUnavailable;
580
+ message: string;
581
+ }
582
+ interface ChannelClosedError {
583
+ type: FinanceKitErrorType.ChannelClosed;
584
+ message: string;
585
+ }
586
+ interface SyncTimedOutError {
587
+ type: FinanceKitErrorType.SyncTimedOut;
588
+ message: string;
589
+ }
590
+ export type FinanceKitError = InvalidTokenError | PermissionError | LinkApiError | PermissionAccessError | UnknownError | NoAccountsError | SyncFailedError | PermissionNotRequestedError | DataUnavailableError | ChannelClosedError | SyncTimedOutError;
551
591
  export interface SubmissionData {
552
592
  phoneNumber?: string;
553
593
  dateOfBirth?: string;
package/dist/src/Types.js CHANGED
@@ -459,5 +459,17 @@ export var FinanceKitErrorType;
459
459
  FinanceKitErrorType[FinanceKitErrorType["LinkApiError"] = 2] = "LinkApiError";
460
460
  FinanceKitErrorType[FinanceKitErrorType["PermissionAccessError"] = 3] = "PermissionAccessError";
461
461
  FinanceKitErrorType[FinanceKitErrorType["Unknown"] = 4] = "Unknown";
462
+ /** The sync ended because Apple returned no accounts shared with this app. */
463
+ FinanceKitErrorType[FinanceKitErrorType["NoAccounts"] = 5] = "NoAccounts";
464
+ /** The server ended the sync with another API error, given in `errorType` and `errorCode`. */
465
+ FinanceKitErrorType[FinanceKitErrorType["SyncFailed"] = 6] = "SyncFailed";
466
+ /** FinanceKit access has not been requested yet and the sync was told not to request it. */
467
+ FinanceKitErrorType[FinanceKitErrorType["PermissionNotRequested"] = 7] = "PermissionNotRequested";
468
+ /** This device, region or OS version cannot provide FinanceKit data. The sync did not start. */
469
+ FinanceKitErrorType[FinanceKitErrorType["DataUnavailable"] = 8] = "DataUnavailable";
470
+ /** The server closed the sync before it completed. Start a new sync to retry. */
471
+ FinanceKitErrorType[FinanceKitErrorType["ChannelClosed"] = 9] = "ChannelClosed";
472
+ /** iOS was about to suspend the app, or an hour passed, before the sync finished. */
473
+ FinanceKitErrorType[FinanceKitErrorType["SyncTimedOut"] = 10] = "SyncTimedOut";
462
474
  })(FinanceKitErrorType || (FinanceKitErrorType = {}));
463
475
  ;
@@ -343,6 +343,19 @@ SWIFT_CLASS("_TtC7LinkKit18PLKPlaidFinanceKit")
343
343
  /// \param onError Closure executed when the sync fails, providing an NSError.
344
344
  ///
345
345
  + (void)syncWithToken:(NSString * _Nonnull)token requestAuthorizationIfNeeded:(BOOL)requestAuthorizationIfNeeded syncBehavior:(PLKSyncBehavior)syncBehavior onSuccess:(void (^ _Nonnull)(void))onSuccess onError:(void (^ _Nonnull)(NSError * _Nonnull))onError SWIFT_AVAILABILITY(ios,introduced=17.4);
346
+ /// Reports whether a FinanceKit sync can run on this phone, without prompting the user.
347
+ /// Use it to decide whether to show an Apple Card option at all (PLKFinanceKitStatusUnavailable),
348
+ /// whether to pass requestAuthorizationIfNeeded:YES to <code>sync</code> (PLKFinanceKitStatusNotDetermined), or
349
+ /// to send the user to Settings instead of syncing (PLKFinanceKitStatusDenied).
350
+ /// warning:
351
+ /// Needs the same FinanceKit entitlement as <code>sync</code>; without it FinanceKit terminates the
352
+ /// process. With the entitlement it is safe to call on any device running iOS 17.4 or later,
353
+ /// including an iPad running your app in compatibility mode.
354
+ /// note:
355
+ /// Available on iOS 17.4 and later.
356
+ /// \param completion Called with the current status, not necessarily on the main queue.
357
+ ///
358
+ + (void)statusWithCompletion:(void (^ _Nonnull)(PLKFinanceKitStatus))completion SWIFT_AVAILABILITY(ios,introduced=17.4);
346
359
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
347
360
  @end
348
361
 
@@ -368,6 +368,10 @@ static NSString *const kPLKExitErrorRawJSONKey = @"PLKExitErrorRawJSONKey";
368
368
  static NSString *const kPLKExitErrorUnknownTypeKey = @"kPLKExitErrorUnknownTypeKey";
369
369
  static NSString *const kPLKExitErrorCodeKey = @"kPLKExitErrorCodeKey";
370
370
 
371
+ /// userInfo keys on the NSError for PLKPlaidFinanceKitErrorSyncFailed: the API error type and code the server ended the sync with.
372
+ static NSString *const kPLKFinanceKitErrorTypeKey = @"PLKFinanceKitErrorTypeKey";
373
+ static NSString *const kPLKFinanceKitErrorCodeKey = @"PLKFinanceKitErrorCodeKey";
374
+
371
375
  static NSString *const kPLKExitErrorInvalidRequestDomain = @"PLKExitErrorInvalidRequestDomain";
372
376
  static NSString *const kPLKExitErrorInvalidInputDomain = @"PLKExitErrorInvalidInputDomain";
373
377
  static NSString *const kPLKExitErrorInstitutionErrorDomain = @"PLKExitErrorInstitutionErrorDomain";
@@ -640,6 +644,51 @@ typedef void(^PLKDismissalHandler)(UIViewController *);
640
644
 
641
645
  @end
642
646
 
647
+ /// The `code` of the NSError a FinanceKit sync fails with, in the kPLKDefaultErrorDomain domain. The values
648
+ /// are stable; new cases are only added at the end.
649
+ typedef NS_ENUM(NSInteger, PLKPlaidFinanceKitError) {
650
+ PLKPlaidFinanceKitErrorInvalidToken = 0,
651
+ PLKPlaidFinanceKitErrorPermissionError = 1,
652
+ PLKPlaidFinanceKitErrorLinkApiError = 2,
653
+ PLKPlaidFinanceKitErrorPermissionAccessError = 3,
654
+ PLKPlaidFinanceKitErrorUnknown = 4,
655
+ /// The sync ended because Apple returned no accounts shared with this app.
656
+ PLKPlaidFinanceKitErrorNoAccounts = 5,
657
+ /// The server ended the sync with another API error, given under kPLKFinanceKitErrorTypeKey and
658
+ /// kPLKFinanceKitErrorCodeKey in the error's userInfo.
659
+ PLKPlaidFinanceKitErrorSyncFailed = 6,
660
+ /// FinanceKit access has not been requested yet and the sync was told not to request it.
661
+ PLKPlaidFinanceKitErrorPermissionNotRequested = 7,
662
+ /// This device, region or OS version cannot provide FinanceKit data. The sync did not start.
663
+ PLKPlaidFinanceKitErrorDataUnavailable = 8,
664
+ /// The server closed the sync channel before the sync completed. Start a new sync to retry.
665
+ PLKPlaidFinanceKitErrorChannelClosed = 9,
666
+ /// iOS was about to suspend the app, or an hour passed, before the sync finished. Start a new sync
667
+ /// while the app is active to retry.
668
+ PLKPlaidFinanceKitErrorSyncTimedOut = 10
669
+ };
670
+
671
+ /// What `+[PLKPlaidFinanceKit statusWithCompletion:]` reports: whether a FinanceKit sync can run on this
672
+ /// phone, and what the user has decided about sharing Wallet data with your app. Reading it never prompts,
673
+ /// but it needs the same FinanceKit entitlement as a sync; without it FinanceKit terminates the process.
674
+ typedef NS_ENUM(NSInteger, PLKFinanceKitStatus) {
675
+ /// FinanceKit cannot provide financial data on this device, region or OS version. A sync would fail with
676
+ /// PLKPlaidFinanceKitErrorDataUnavailable, so do not offer Apple Card here.
677
+ PLKFinanceKitStatusUnavailable,
678
+ /// The user has never been asked. A sync with requestAuthorizationIfNeeded:YES shows Apple's prompt;
679
+ /// with NO it fails with PLKPlaidFinanceKitErrorPermissionNotRequested.
680
+ PLKFinanceKitStatusNotDetermined,
681
+ /// The user declined Apple's prompt, or turned sharing off later. iOS will not prompt again; only the user
682
+ /// can change it, under Settings > Apps > (your app) > Wallet. A sync fails with
683
+ /// PLKPlaidFinanceKitErrorPermissionAccessError.
684
+ PLKFinanceKitStatusDenied,
685
+ /// Your app may read the user's Wallet data. An Apple Card in the Wallet, or any account shared with your
686
+ /// app, is not guaranteed, so a sync can still end with PLKPlaidFinanceKitErrorNoAccounts.
687
+ PLKFinanceKitStatusAuthorized,
688
+ /// FinanceKit did not report a status. Treat it like NotDetermined and let the sync decide.
689
+ PLKFinanceKitStatusUnknown
690
+ };
691
+
643
692
  typedef NS_ENUM(NSInteger, PLKSyncBehavior) {
644
693
  PLKSyncBehaviorLive,
645
694
  PLKSyncBehaviorSimulated