是iOS上的PhoneGap硬编码加载www / index.html? [英] Is PhoneGap on iOS hard coded to load www/index.html?

查看:130
本文介绍了是iOS上的PhoneGap硬编码加载www / index.html?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android的PhoneGap上,您可以修改App.java类以加载任何网址。我找不到任何地方改变iOS版本的入口点。



测试时,我更喜欢有几个www目录,具有不同的设置。

解决方案

你可以这样做:



创建默认的index.html并加载自己的html根文件,这样就可以保留自己的目录结构,无需对其进行任何修改。 p>

当然,phonegap是开源的,所以你还可以提交一个更改phonegap更改iOS api类似于Android API。目前看来,根html文件路径是在PhoneGapDelegate.m


类中确定的

On PhoneGap on Android you can modify the App.java class to load any url. I can't find anywhere to change the entry point on the iOS version.

When testing I prefer to have a few "www" directories with different setups. At the moment I need to rename the directories which is a bit of a nuisance.

解决方案

You could do this:

Create the default index.html and have it wrap and load your own html root file, that way you can keep your own directory structure and no need to do any modifications there.

Of course, phonegap is open source, so you could also commit a change to phonegap to change the iOS api similar to Android API. Currently it seems the root html file path is determined in class PhoneGapDelegate.m

这篇关于是iOS上的PhoneGap硬编码加载www / index.html?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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