pbernasconi / plaid-link-ionic-2-example

Plaid Link and Ionic 2 example app
https://plaid.com/docs/quickstart
7 stars 3 forks source link

plaid link fails to open view in iPhone 6s iOS 10.2.2 #1

Open bsakweson opened 7 years ago

bsakweson commented 7 years ago

Hello there, I am using plaid in my apps and ran into an issue where plaid link is unable to open bank accounts view on my test iPhone. I am able to open the same view using the web when I use ionic serve

Using the debugger, I can see that bank information is retrieved successfully from plaid remote service but is not displayed since the view is not opened. Could This be the reason why I am having this difficulty?


    this.linkHandler = Plaid.create({
      clientName: Api.APP_NAME,
      env: Api.PLAID_EVIRONMENT,
      key: Api.PLAID_PUBLISHABLE_KEY,
      product: ['auth'],
      selectAccount: false,
      forceIframe: true,
      onLoad: function () {
        console.debug('loaded');
      },
      onSuccess: function (public_token: string, metadata: PlaidMetadata) {
        if (metadata != null) {
          let item: BankAccount = {
            accountId: metadata.account.id,
            accountName: metadata.account.name,
            institutionId: metadata.institution.institution_id,
            institutionName: metadata.institution.name,
            publicToken: public_token
          };
          saveDetails(item);
          console.log(item);
        }
      },
      onExit: function (err, metadata: PlaidMetadata) {
        if (err != null) {
          console.error(err);
        }
      }
    });
    console.log(this.linkHandler);
  }

  forceExitLink() {
    this.linkHandler.exit();
  }

  openLink() {
    console.log("Open link button clicked");
    this.linkHandler.open();
  }````
mkeung commented 6 years ago

Very late reply but I ran into a similar issue. Had to change config.xml to

<allow-navigation href="*" />

To allow the iframe to open. I now have an issue with the iframe going all the way to the top and having the close under the status bar.