I want to open the URL directly in the app. In Android it is working fine. On iOS it only shows a blank white screen after starting. I have set target
to _blank
, because I do now want iOS to open the URL in Safari App.
import {InAppBrowser, InAppBrowserOptions} from '@ionic-native/in-app-browser/ngx';
...
options: InAppBrowserOptions = {
location : 'no',
hidden : 'no',
zoom : 'yes',
hideurlbar: 'yes',
toolbar: 'no',
hidenavigationbuttons: 'yes',
};
constructor(private iab: InAppBrowser) {
this.iab.create('https://www.google.com', '_blank', this.options);
}
confif.xml:
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>MyApp</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<access origin="*" />
<allow-intent href="*" />
<allow-navigation href="*" />
<preference name="ScrollEnabled" value="false" />
<preference name="android-minSdkVersion" value="19" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
....
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
...
</platform>
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<engine name="android" spec="7.1.4" />
</widget>
…
$ cordova plugins ls
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-inappbrowser 4.1.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
…
$ ionic info
Ionic:
Ionic CLI : 5.4.16 (/Users/u2007750/.nvm/versions/node/v10.15.3/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.1
@angular-devkit/build-angular : 0.12.4
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.2.4
@ionic/angular-toolkit : 1.4.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 7.1.4, ios 6.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 5.0.0, (and 5 other plugins)
Utility:
cordova-res (update available: 0.15.2) : 0.8.0
native-run (update available: 1.3.0) : 0.2.7
System:
ios-deploy : 1.10.0
ios-sim : 8.0.2
NodeJS : v10.15.3 (/Users/u2007750/.nvm/versions/node/v10.15.3/bin/node)
npm : 6.4.1
OS : macOS Catalina
Xcode : Xcode 11.5 Build version 11E608c
1 post - 1 participant