Ionic-native: InAppBrowser not working

Created on 13 Oct 2016  路  3Comments  路  Source: ionic-team/ionic-native

I'm getting this message when I try to use the InAppBrowser:
"Native: InAppBrowser is not installed or you are running on a browser. Falling back to window.open, all instance methods will NOT work."

I have a repo set up with the example project which is not working on my machine: https://github.com/golear91/ionic2-broken-inappbrowser

repro steps (used to create above repo)

  • used the cli to "start" a tabs project
  • added a single provider (using generator)
  • added provider to one of my tabs
  • add plugin using: ionic plugin add cordova-plugin-inappbrowser
  • import & attempt to use InAppBrowser
  • get this message: "Native: InAppBrowser is not installed or you are running on a browser. Falling back to - window.open, all instance methods will NOT work."
  • instance methods in fact do NOT work.

I'm doing everything exactly as described in the documentation

Most helpful comment

You gotta wait for deviceready to fire. Wrap it with platform.ready().then(() => { ... })

All 3 comments

You gotta wait for deviceready to fire. Wrap it with platform.ready().then(() => { ... })

Cool, I had no idea. So I'm guessing all native functionality has to wait for device ready?
I now see some examples here (none for angular2).
Am I capable of contributing to the documents so that I can prevent others from running in to the same problem as I?

@golear91 Yes you have to wait for deviceready before talking to any native API.

We might be implementing built-in event listener for all the async functions in v2.3.0 of Ionic Native.

Also, it is documented here that you have to wait for deviceready.

Was this page helpful?
0 / 5 - 0 ratings