This weird issue could be specific to my project as it isn’t in newly created project with same feature.
My app contains content area which shows content in HTML format(texts and links) along with areas where I can embed YouTube videos.
As, you know, to allow iPhone to properly display contents/video of embedded YouTube iframe, we need to add following codes in config.xml
file -
<allow-navigation href="https://*youtube.com/*" />
<preference name="AllowInlineMediaPlayback" value="true" />
But, after that anchor tags stop working without any logs in console (I have debugged devices). They do nothing as if someone has added href="javascript:void()"
tag into it. Look at this question.
Everything works perfectly in all other devices and browsers.
But when I remove allow-navigation
from config.xml
, all links work normally (except those embedded videos).
How can I make both links and embedded videos to work normally at same time?
If nothing works, I have a backup plan of using In App Browser.
I am using following plugins into my project -
<plugin name="cordova-plugin-device" spec="^2.0.1" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova-plugin-app-launcher" spec="^0.4.0" />
<plugin name="cordova-plugin-appavailability" spec="^0.4.2" />
<plugin name="cordova-plugin-iroot" spec="^0.4.0" />
<plugin name="cordova-plugin-privacyscreen" spec="^0.4.0" />
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.16" />
Ionic info -
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : none
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v8.9.1
npm : 5.6.0
OS : Windows 10