Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic 2 InAppBrowser options not working

The inAppBrowser works and it opens a URL but I want it to be more seamless in the experience. Almost to the point where it doesn't feel like you've actually left the app. Whenever I try passing any options it doesn't seem to take. In the docs it seems straight forward, you just pass a long string seperated by commas but it doesn't seem to work.

I've tried:

  const browser = this.iab.create('http://example.net','_self', "location=no,toolbar=no,closebuttoncaption=home,transitionstyle=fliphorizontal");

even:

 const browser = this.iab.create('http://example.net','_self', "location='no',toolbar='no',closebuttoncaption='home',transitionstyle='fliphorizontal'");

None of these options seem to take. on iOS it always seems to open up the URL in a safari web view with the toolbar at the bottom and the url/location bar at the top...

Anyone else experiencing this? I should mention this behavior is for iOS

like image 859
Mickey Sly Avatar asked Dec 09 '25 13:12

Mickey Sly


1 Answers

Use '_blank' instead of '_self' as target.

OR

Add this to your config.xml

<access origin="*" />
<allow-navigation href="*" />
<allow-intent href="*" />
like image 148
Swapnil Patwa Avatar answered Dec 11 '25 03:12

Swapnil Patwa