在带有外部URL的iOS上使用PhoneGap / Cordova [英] Using PhoneGap/Cordova on iOS with external URL

查看:268
本文介绍了在带有外部URL的iOS上使用PhoneGap / Cordova的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我的phonegap / cordova应用程序加载外部页面,没有本地。

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上?我也应该加载那里cordova-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

查看此项目: https://dl.dropbox.com/u/930742/so/CordovaBrowserSO.zip

您可以看到没有 index.html 文件夹。

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.

在服务器我有所有文件,您可以看到在使用模板Cordova项目创建的基本的 www / 文件夹:

At the server I have all files that you can see in basic www/ folder created with template Cordova project:

所有插件&

如果您选择 config,您可以直接在 index.html .xml ,您将看到

< content src =http://dymv.comeze.com/www/index。 html/>

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。

Eugene

BR.
Eugene

这篇关于在带有外部URL的iOS上使用PhoneGap / Cordova的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆