Code Monkey home page Code Monkey logo

plaid-link-ios's Introduction

Plaid Link for iOS version swift compatibility

📱 This repository contains multiple sample applications (requiring Xcode 14) that demonstrate integration and use of Plaid Link for iOS.

📚 Detailed instructions on how to integrate with Plaid Link for iOS can be found in our main documentation at plaid.com/docs/link/ios.

5️⃣ If you're updating from version 4.x to 5.x please read our migration guide.

⚠️ All integrations must upgrade to version 4.1.0 of the SDK (released January 2023) by January 1, 2024, to maintain support for Chase OAuth connections.

About the LinkDemo Xcode projects

Plaid Link can be used for different use cases and the sample applications demonstrate how to use Plaid Link for iOS for each use case. For clarity between the different use cases, each use case specific example showing how to integrate Plaid Link for iOS is implemented in a Swift extension.

Before building and running the sample application replace any Xcode placeholder strings (like <#GENERATED_LINK_TOKEN#>) in the code with the appropriate value so that Plaid Link is configured properly. For convenience the Xcode placeholder strings are also marked as compile-time warnings.

Steps to acquire a Link token

Build and run the demo application to experience the Link flow for yourself.

plaid-link-ios's People

Contributors

afh avatar ai- avatar barryelevatyr avatar chad-colby avatar davidchambers avatar dependabot[bot] avatar dtroupe-plaid avatar edmundloo avatar hughdevore avatar idris avatar jeroenmols avatar jwupl avatar maxpleaner avatar michaelckelly avatar mike-roberts avatar nathankot avatar pbernasconi avatar phoenixy1 avatar pladaub avatar plaid-jlamb avatar pmusolino avatar ravron avatar rogerluan avatar rstormsf avatar samuelbeaulieu avatar schwartzdev avatar sohlis avatar soroushjp avatar souhaylmaronesy avatar waterskier2007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plaid-link-ios's Issues

redirect_uri is missing but it seems we have it all configured correctly


A detailed description of the steps to reproduce the issue

When selecting Platpus OAuth Bank (or any bank for that matter), we see the following warning banner:

File (27)

We have configured our redirect uri in the Plaid dashboard.

Screenshot 2024-01-08 at 3 40 49 PM

Assume that our uri is the following:

https://mycompany.com/n/native-oauth-plaid-link-completed

in Xcode, we have set up applinks like so:

Screenshot 2024-01-08 at 3 24 58 PM Screenshot 2024-01-08 at 3 25 17 PM

When we create the link token we pass the redirectUrl "https://mycompany.com/n/native-oauth-plaid-link-completed".

We have an apple-app-site-association file being hosted. Here is the basic outline of our apple-app-site-association:

Screenshot 2024-01-08 at 3 27 44 PM

What you expected to see?

I expected that our redirect uri was set up correctly and the banner in the screenshot above stating we have a missing redirect_uri is not present.

What you saw instead?

The banner saying we have potential issues with our redirect_uri.


When submitting an issue for Link on the web or within a Webview, please include the following information:

N/A

When submitting an issue for Plaid Link iOS please include the following information:

Name Value
Link env Sandbox
LinkKit version 5.0.0
iOS version 17.1.2
iOS device iPhone 15 pro

Note: This happens on both physical device and simulators of various versions and device types.

List of used 3rd party libraries (e.g. CocoaPods):

Misleading error for expired link_token

Please do not include your API secret or public_key in any issue.

A detailed description of the steps to reproduce the issue

  1. Make sure a redirect URI has been setup as a Universal Link in your aasa file and registered in the Plaid Dashboard following docs here
  2. Create a link_token following the docs here
  3. Let the link_token expire
  4. From one of the iOS Plaid sample apps included in this repository (I used LinkDemo-SwiftUI) , use the expired link_token to create a LinkTokenConfiguration instance for calling Plaid.create()
  5. Run the sample app and click on Open Plaid Link
  6. Notice an error screen is rendered (see screenshot below) and an error is returned that indicates a redirect URI must be configured in the developer dashboard which is not indicative of the true issue (an expired link_token)

What you expected to see?

An error that mentions the link_token is expired

What you saw instead?

An error that mentions a redirect URI has not been configured in the Plaid dashboard:

exit with ExitError(errorCode: LinkKit.ExitErrorCode.invalidRequest(INVALID_FIELD), errorMessage: "OAuth redirect URI must be configured in the developer dashboard. See https://plaid.com/docs/#oauth-redirect-uris", displayMessage: Optional(""), errorJSON: Optional("{\n  \"display_message\": null,\n  \"documentation_url\": \"https://plaid.com/docs/?ref=error#invalid-request-errors\",\n  \"error_code\": \"INVALID_FIELD\",\n  \"error_message\": \"OAuth redirect URI must be configured in the developer dashboard. See https://plaid.com/docs/#oauth-redirect-uris\",\n  \"error_type\": \"INVALID_REQUEST\",\n  \"request_id\": \"9o4dbGVjPNSp8lD\",\n  \"suggested_action\": null\n}"))
ExitMetadata(status: Optional(), institution: Optional(LinkKit.Institution(id: "", name: "")), linkSessionID: Optional(""), requestID: Optional(""), metadataJSON: nil)
Screenshots that show the state of the UI (if applicable) expiredTokenError

When submitting an issue for Plaid Link iOS please include the following information:

Name Value
Link env Sandbox
LinkKit version 4.6.5
iOS version 17.0
iOS device iPhone 15 simulator

List of used 3rd party libraries (e.g. CocoaPods):

Custom deprecated but no way provided to present from SwiftUI

I'm seeing this warning now on the latest release.
"'custom' is deprecated: Presenting Link with modalPresentationStyle .overFullScreen or .fullScreen is no longer supported. You may experience UI issues if you present Link using those modalPresentationStyles."

However this is the main way you provide to present Plaid is SwiftUI. How then should we present it. I can't get .viewController to work.

identity_verfication request stuck in-progress due to failed /link/workflow/event request

Please do not include your API secret or public_key in any issue.

A detailed description of the steps to reproduce the issue

Using a link token created against the identity_verfication product, the iOS Plaid Link SDK is unable to load the start of the product workflow due to an error received from a request to https://sandbox.plaid.com/link/workflow/event fired shortly after a successful https://sandbox.plaid.com/link/workflow/start request. The identity_verfication request is then stuck in-progress and cannot be cancelled from the Plaid Dashboard.

  1. Make sure a redirect URI has been setup as a Universal Link in your aasa file and registered in the Plaid Dashboard following docs here
  2. Create a link_token following the docs here
  3. From one of the iOS Plaid sample apps included in this repository (I used LinkDemo-SwiftUI) , use the link_token given back from the cURL request made in step 2 to create a LinkTokenConfiguration instance for calling Plaid.create().
  4. Run the sample app and click on Open Plaid Link
  5. Notice the view presenting Plaid's content is stuck on a white screen (see screenshot below) and an error appears in the console mentioning an invalid workflow session id:
2023-10-17 17:08:55 +0000 com.plaid.linkdemo.ios.swiftui/ ERROR: Error sending webviewFallbackOpen event: linkError(Optional(Workflow.LinkApiError(displayMessage: nil, documentationURL: nil, errorCode: Optional("INVALID_FIELD"), errorMessage: Optional("invalid workflow session id"), errorType: Optional("INVALID_REQUEST"), requestID: nil, suggestedAction: nil)), Optional("{\n  \"display_message\": null,\n  \"documentation_url\": \"https://plaid.com/docs/?ref=error#invalid-request-errors\",\n  \"error_code\": \"INVALID_FIELD\",\n  \"error_message\": \"invalid workflow session id\",\n  \"error_type\": \"INVALID_REQUEST\",\n  \"request_id\": \"WkEKaKgt6zAaW0w\",\n  \"suggested_action\": null\n}"))
  1. If you perform step 4 with a proxy running, you'll notice 2 requests are fired:

A request to https://sandbox.plaid.com/link/workflow/start that successfully returns a https://verify-sandbox.plaid.com/plaid/verify/foo URL in the response which when copy/pasted into a web browser looks great, but is not rendered in-app due to the failure below.

A request to https://sandbox.plaid.com/link/workflow/event with request body:

3 {
  29: ""
}

Failing on a 400 with response body:

{
  "display_message": null,
  "documentation_url": "https://plaid.com/docs/?ref=error#invalid-request-errors",
  "error_code": "INVALID_FIELD",
  "error_message": "invalid workflow session id",
  "error_type": "INVALID_REQUEST",
  "request_id": "DBhqBNTHSPD9r1L",
  "suggested_action": null
}

What you expected to see?

I expect to see the start of the identity verification flow as defined by the template I created in the Plaid Dashboard and referenced in my create token cURL request.

Some Notes:

What you saw instead?

An error in the console:

2023-10-17 17:08:55 +0000 com.plaid.linkdemo.ios.swiftui/ ERROR: Error sending webviewFallbackOpen event: linkError(Optional(Workflow.LinkApiError(displayMessage: nil, documentationURL: nil, errorCode: Optional("INVALID_FIELD"), errorMessage: Optional("invalid workflow session id"), errorType: Optional("INVALID_REQUEST"), requestID: nil, suggestedAction: nil)), Optional("{\n  \"display_message\": null,\n  \"documentation_url\": \"https://plaid.com/docs/?ref=error#invalid-request-errors\",\n  \"error_code\": \"INVALID_FIELD\",\n  \"error_message\": \"invalid workflow session id\",\n  \"error_type\": \"INVALID_REQUEST\",\n  \"request_id\": \"WkEKaKgt6zAaW0w\",\n  \"suggested_action\": null\n}"))

The simulator stuck on a white screen and the identity verification requests stuck in-progress in the Plaid Dashboard

Screenshots that show the state of the UI (if applicable) Screenshot 2023-10-17 at 12 12 06 PM Screenshot 2023-10-17 at 12 31 43 PM

When submitting an issue for Plaid Link iOS please include the following information:

Name Value
Link env Sandbox
LinkKit version 4.6.5
iOS version 17.0
iOS device iPhone 15 simulator

List of used 3rd party libraries (e.g. CocoaPods):

SPM loading extremely slow

A detailed description of the steps to reproduce the issue

I haven't faced soo slow package loading ever for any other library where its been 2 hours and the package progress keeps on reseting once it reaches 11%.

What you expected to see?

SPM package should resolve in minutes. It depends on internet connection speed but i have million other projects using countless dependencies but no one stuck's this bad.

What you saw instead?

Package not resolving.
| Name Plaid Link iOS | Value | v5.3.2
|-----------------|-------|
| Link env | |
| LinkKit version | 5.3.2 |
| iOS version | |
| iOS device | |

Getting an Exit event with unknown error when dismissing modal in verify identity step

Please do not include your API secret or public_key in any issue.

A detailed description of the steps to reproduce the issue

When going through the linking process and then verifying identity step when pressing cancel we got an exit call back without an error
but if we hit the 'x' button we get an exit callback with an unknown error
plz check screenshot for more info
*
*
*

What you expected to see?

receive exit callback without an error

What you saw instead?

ExitError(errorCode: LinkKit.ExitErrorCode.unknown(type: "", code: ""), errorMessage: "", displayMessage: Optional(""), errorJSON: nil)

Screenshots that show the state of the UI (if applicable) Screenshot 2024-01-18 at 4 52 56 PM

When submitting an issue for Link on the web or within a Webview, please include the following information:

Name Value
Link env
Browser
Operating system

When submitting an issue for Plaid Link iOS please include the following information:

Name Value
Link env production
LinkKit version 5.1.0
iOS version 17.2.1
iOS device 14 pro max

List of used 3rd party libraries (e.g. CocoaPods):

Missing purpose for User ID usage in PrivacyInfo.xcprivacy

A detailed description of the steps to reproduce the issue

I see a PrivacyInfo.xcprivacy file was recently added to this repository to help app developers to understand the API use and data-collection practices of your SDK. However there is some info missing in the PrivacyInfo.xcprivacy file. The NSPrivacyCollectedDataTypePurposes for NSPrivacyCollectedDataTypeUserID seems to be an empty array.

This can also be seen when generating a privacy report using the LinkKit SDK.
image

What you expected to see?

I expect that a reason for collection the data will be entered in the PrivacyInfo.xcprivacy file as described in this document by Apple - https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests.

Wrong positioning of subview layers of InProcessWebviewFallbackController

In latest plaid link kit version 5.3.2 there is wrong positioning of plaid screens

  • Screens are cropped and not 100% height on initial start
  • There is a slow animation with loading circle on initial start

Expected

  • Plaid screens not cropped
  • Plaid screens load faster

Now

  • Plaid screens cropped and looks weird
  • Plaid screens starts very slow after handler.open executed
Screenshots that show the state of the UI

image
image


When submitting an issue for Plaid Link iOS please include the following information:

Name Value
Link env sandbox
LinkKit version 5.1.0 - 5.3.2
iOS version 17.3.1
iOS device iPhone 11

Suggestion: Distribute LinkKit.xcframework with static library or with `-make_mergeable` linker flag to improve apps launch time

Please do not include your API secret or public_key in any issue.

A detailed description of the steps to reproduce the issue

While converting some of our dependencies from dynamic libraries to static to reduce app size and app launch time, we notice that LinkKit is distributed as dynamic framework. It would if the xcframework included the -make_mergeable linker flag that adds a new load command to the dylib, making it a mergeable library, that could be linked to app binary, just like a static library.


When submitting an issue for Link on the web or within a Webview, please include the following information:

Name Value
Link env
Browser
Operating system

When submitting an issue for Plaid Link iOS please include the following information:

Name Value
Link env
LinkKit version
iOS version
iOS device

List of used 3rd party libraries (e.g. CocoaPods):

Capture quick modal dismissal in `onExit` or `onEvent` callback

Please do not include your API secret or public_key in any issue.

A detailed description of the steps to reproduce the issue

Currently, in our iOS app, based on onExit callback we inform the user that he has exited the flow but when he dismisses it very quickly callback is not triggered

  • present plaid modal
  • quickly dismiss plaid view
  • check if onExit callback is triggered

What you expected to see?

onExit has been triggered

What you saw instead?

onExit not triggered neither onEvent

Screenshots that show the state of the UI (if applicable)

When submitting an issue for Link on the web or within a Webview, please include the following information:

Name Value
Link env
Browser
Operating system

When submitting an issue for Plaid Link iOS please include the following information:

Name Value
Link env dev
LinkKit version 5.0.1
iOS version 17.0.1
iOS device iPhone 15 pro

List of used 3rd party libraries (e.g. CocoaPods):

Is there documentation about testing in production?

Is there any way to test end to end in production without linking our own personal bank account? For example, we have a prod smoke testing account that we can use, but if we want to test the app to app flow between our app and say Chase bank to ensure redirects are working, linking is successful, etc., we have to link our own personal bank accounts.

Does Plaid provide any support for somehow smoke testing in production without using personal data?

How to use resumeAfterTermination when the app has been fully quit - iOS

A detailed description of the steps to reproduce the issue

  • Start link flow with Plaid OAuth app2app (in this case - Chase)
  • User kills our app
  • User's banking app routes them back to our app
  • Use Plaid's resumeAfterTermination

Can you provide instructions or example code on using this API?

What you expected to see?

A continuation of the OAuth flow.

What you saw instead?

It appears to be some sort of internal TODO message left by developers?

Screenshots that show the state of the UI (if applicable)

Some Relevant Code

            handler.resumeAfterTermination(from: url)
            let modalPresentation: LinkKit.PresentationHandler = { [weak self] linkVC in
                guard let self else { return }
                linkVC.isModalInPresentation = true // prevents swiping to dismiss
                self.present(linkVC, animated: true)
            }
            handler.open(presentUsing: .custom(modalPresentation))

When submitting an issue for Plaid Link iOS please include the following information:

Name Value
Link env prod
LinkKit version 4.6.5
iOS version 17.1
iOS device iPhone 15 Pro

List of used 3rd party libraries:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.