initialxy / cordova-plugin-themeablebrowser

Fork of org.apache.cordova.inappbrowser in an attempt to make it a bit more themeable and configurable to add some custom actions.
Apache License 2.0
294 stars 221 forks source link

Ionic 3: Unfortunately, app has stopped working #167

Open hamzatrq opened 6 years ago

hamzatrq commented 6 years ago

Greetings, I am using this plugin in ionic 2 and I am following the documentation but whenever I try to open the browser the app crashes.

Plugin version from package.json "@ionic-native/themeable-browser": "^4.4.2"

Output of ionic info

cli packages: (C:\Users\dell\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.3
Cordova Platforms  : android 6.3.0 browser 5.0.1 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v6.11.4
npm               : 3.10.10
OS                : Windows 10

Environment Variables:

ANDROID_HOME : C:\Users\dell\AppData\Local\Android\sdk

Misc:

backend : legacy

My function: openBrowser() { const options: ThemeableBrowserOptions = { statusbar: { color: '#488affff' }, toolbar: { height: 44, color: '#488affff' }, toolbarposition: 'bottom', title: { color: '#ffffffff', showPageTitle: true }, backButton: { image: 'back', imagePressed: 'back_pressed', align: 'left', event: 'backPressed' }, forwardButton: { image: 'forward', imagePressed: 'forward_pressed', align: 'left', event: 'forwardPressed' }, closeButton: { image: 'close', imagePressed: 'close_pressed', align: 'left', event: 'closePressed' }, customButtons: [ { image: 'share', imagePressed: 'share_pressed', align: 'right', event: 'sharePressed' } ], menu: { image: 'menu', imagePressed: 'menu_pressed', title: 'Test', cancel: 'Cancel', align: 'right', items: [ { event: 'helloPressed', label: 'Hello World!' }, { event: 'testPressed', label: 'Test!' } ] }, backButtonCanClose: true };

this.browser = this.themeableBrowser.create('https://search.stream.cr', '_self', options);
this.browser.show();

}

medbz commented 6 years ago

having the same problem on ios .

xingducai commented 6 years ago

remove the code: this.browser.show();