在iOS上使用的PhoneGap /科尔多瓦与外部URL [英] Using PhoneGap/Cordova on iOS with external URL
问题描述
我希望我的PhoneGap /科尔多瓦的应用程序加载外部页面并没有什么地方。
I want my phonegap/cordova app to load an external page and nothing local.
现在,我做到这一点,但是我的插件(JavaScript的)不工作,因为他们是从当地的index.html调用。
Now that i do that , however my plugins (javascript) dont work because they are called from the local index.html.
我在这种情况下怎么办?我应该把我的外部URL的插件,并加载它们对外界的index.html?此外,我还应该负载,科尔多瓦,2.5.0.js?
What do i do in this case? I should put the plugins on my external URL and load them on the external index.html? Also i should also load there the cordova-2.5.0.js ?
如果这是唯一的办法,如果我想要加载,我不把自己的服务器外部网页会发生什么,但我想有推送通知启用?
And if this is the only way , what happens if i want to load an external page that i dont own the server , but i would like to have push notifications enabled?
我将如何使这些插件?
推荐答案
的 d0nparalias 的
d0nparalias,
看这个项目:<一href=\"https://dl.dropbox.com/u/930742/so/CordovaBrowserSO.zip\">https://dl.dropbox.com/u/930742/so/CordovaBrowserSO.zip
正如你可以看到有没有里面的index.html
或 WWW /
文件夹中。
As you can see there is no index.html
or www/
folder inside.
所有文件上传到服务器,并根据需要将应用程序下载。
All files were uploaded to the server and app will download them as needed.
我做的步骤,从第1页来完成它。从 http://stackoverflow.com/a/15319156/753878 答案。
I've accomplished it by doing steps from p.1. from http://stackoverflow.com/a/15319156/753878 answer.
在服务器我有,你可以在基本的查看所有文件 WWW /
文件夹模板科尔多瓦项目创建:
At the server I have all files that you can see in basic www/
folder created with template Cordova project:
所有的插件及功放;东西你直接在 index.html的
包括您的服务器上。
All plugins & stuff you include directly in index.html
on your server.
如果您检查 config.xml中
从存档上面你会看到结果&lt;内容SRC =http://dymv.comeze.com/www/index.html/&GT;
If you check config.xml
from the archive above you'll see
<content src="http://dymv.comeze.com/www/index.html" />
和上推出的应用程序会说:
And the app on launch will say:
希望这是你想达到什么。结果
如果不是的话 - 请提供更多信息有关导致你想达到
Hope it's what you want to reach.
If it's not — please provide more info about result you want to achieve.
BR。结果
尤金
BR.
Eugene
这篇关于在iOS上使用的PhoneGap /科尔多瓦与外部URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!