簡體   English   中英

科爾多瓦/ phonegap遠程內容插件無法正常運行ios

[英]cordova / phonegap remote content plugins not working ios

我僅使用2個其他插件制作了cordova ios應用程序:

  • com.phonegap.plugins.barcodescanner
  • org.apache.cordova.console(xcode中的輸出console.log())

我正在使用Cordova 4.1.2

當應用程序內容指向本地index.html時,一切正常

config.xml中

    <gap:plugin name="com.phonegap.plugins.barcodescanner" />
    <content src="index.html" />
    <access origin="*" />

但是當內容來自遠程URL時:

<gap:plugin name="com.phonegap.plugins.barcodescanner" />
    <content src="http://192.168.115.179/app/index.php" />
    <access origin="*" />

該應用程序啟動並打開遠程網站,但插件不起作用。 console.log()消息不會顯示在xcode中,並且不會出現條形碼視圖。 沒有js錯誤,xcode也沒有顯示錯誤。

index.php html:

<body>
...
</body>
<script type="text/javascript" src="{$ProjectWebPath}/sources/interfaces/lead/www/cordova.js"></script>
<script type="text/javascript" src="{$ProjectWebPath}/sources/interfaces/lead/www/js/barcodescanner.js"></script>
<script type="text/javascript" src="{$ProjectWebPath}/sources/interfaces/lead/www/js/index.js"></script>
<script type="text/javascript">
    app.initialize();
</script>
</html>

似乎其中包含不正確的js文件,但路徑正確,並且我去年使用此方法執行了相同的應用程序,並且效果很好(Cordova版本3.x)。

任何人知道什么地方錯了嗎?

謝謝

發現了失敗。 指向非平台特定的cordoba.js,因此cordoba_plugin.js沒有正確的插件路徑

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM