Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordova"]) is not a function. #57

Open
eisenheim94 opened this issue Apr 11, 2019 · 0 comments

Comments

@eisenheim94
Copy link

eisenheim94 commented Apr 11, 2019

Hi! I'm trying to open Gmail app, but looks like there are issue with native code.

My TS:

  openGmail(threadId, fromEmail) {
    let app;

    console.log('openGmail pressed');
    if (this.platform.is('ios')) {
      app = 'googlegmail://';
    } else if (this.platform.is('android')) {
      app = 'com.google.android.gm';
    }

    console.log('looking for app' + app);

    this.appAvailability.check(app)
      .then(
        (yes: boolean) => {
          console.log(app + ' is available')
          // const browser = this.iab.create('googlegmail://' + fromEmail + '?ui=2&#sent/' + threadId, '_system');
        },
        (no: boolean) => {
          console.log(app + ' is NOT available')
          // const browser = this.iab.create('https://mail.google.com/mail/b/' + fromEmail + '?ui=2&#sent/' + threadId, '_system');
        }
      );

    console.log('looking for twitter');

    this.appAvailability.check('twitter://')
      .then(
        (yes: boolean) => {
          console.log('Twitter is available')
          const browser = this.iab.create('twitter://', '_system');
        },
        (no: boolean) => {
          console.log('Twitter is NOT available')
        }
      );
    // https://mail.google.com/mail/b/[email protected]?ui=2&#sent/169dd829f7874210
    // let browser = new InAppBrowser('url', '_system'); //For system browser, you'll be prompt to choose your browser if you have more than one
  }

But in Xcode log I don't see anything after this.appAvailability.check(app):

2019-04-11 18:11:22.042089+0300 M3[3784:606869] openGmail pressed
2019-04-11 18:11:22.042195+0300 M3[3784:606869] looking for appgooglegmail://

In browser on desktop I see next error after click:

TS error in browser console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant