ios - Phonegap inappbrowser not working -
i had simple test on plugin cordova-plugin-inappbrowser , doesn't work, please help. did: 1. phonegap create phonegap-default
2. phonegap plugin add cordova-plugin-inappbrowser --save
3. add line www/index.html @ bottom inside "app" div:
<a href="var ref = cordova.inappbrowser.open('http://apache.org', '_blank', 'location=yes');"><h1>test</h1></a>
the index.html following:
<html> <head> <meta charset="utf-8" /> <meta name="format-detection" content="telephone=no" /> <meta name="msapplication-tap-highlight" content="no" /> <!-- warning: ios 7, remove width=device-width , height=device-height attributes. see https://issues.apache.org/jira/browse/cb-4323 --> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> <link rel="stylesheet" type="text/css" href="css/index.css" /> <title>hello world</title> </head> <body> <div class="app"> <h1>phonegap</h1> <div id="deviceready" class="blink"> <p class="event listening">connecting device</p> <p class="event received">device ready</p> </div> <a href="var ref = cordova.inappbrowser.open('http://apache.org', '_blank', 'location=yes');"><h1>test</h1></a> </div> <script type="text/javascript" src="cordova.js"></script> <script type="text/javascript" src="js/index.js"></script> <script type="text/javascript"> app.initialize(); </script> </body>
- phonegap serve
- open phonegap develop app (in ios 9.2.1), connect phonegap server touch test link. nothing happened.
my phonegap version 5.4.1. in advance.
i think should add:
<access origin="http://apache.org" subdomains="true" />
in config.xml maybe nessessary add
<feature name="inappbrowser"> <param name="ios-package" value="cdvinappbrowser" /> </feature>
for further information go to: https://cordova.apache.org/docs/en/3.0.0/cordova/inappbrowser/inappbrowser.html
for using plugin android should add cordova-plugin-whitelist plugin:
Comments
Post a Comment