添加到科尔多瓦1.6.0后HTML页面不工作iOS
问题描述:
我已经在xcode 4.x中安装了Cordova 1.6.0。我创建了一个新的PhoneGap项目,并在5.1.1 iPhone模拟器中执行相同的操作。科尔多瓦正在工作是成功的。 我在我的项目中添加了www文件夹。现在我在www文件夹中添加了我的HTML,CSS和JS文件。我改变了AppDelegate.m并将加载html页面指向我的login.html。加载页面,但没有任何JS或CSS。 login.html包含如下代码:添加到科尔多瓦1.6.0后HTML页面不工作iOS
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<meta name="viewport" content="width=device-width, initial-scale=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta charset="utf-8">
<script type="text/javascript" charset="utf-8" src="js/cordova-1.6.0.js"></script>
<link rel="stylesheet"
href="css/jquery.mobile-1.1.0.min.css" />
<script type="text/javascript" charset="utf-8"
src="js/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.cookie.js"></script>
<script src="js/jquery.toastmessage-min.js"></script>
<script type="text/javascript" charset="utf-8"
src="js/jquery.mobile-1.1.0.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/json2.js"></script>
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="css/jquery.toastmessage-min.css" rel="stylesheet"
type="text/css">
页面引用所有本地存储的文件。该页面还会访问外部URL以获取document.ready中的数据。 任何人都可以找到出错的地方吗?
答
此链接帮助了我。 Jquery mobile with phonegap is not styling properly for mobile app
我正在使用jquery 1.6.4这是一个错误的组合。 的组合应该是─ 科尔多瓦,1.6.0.js jquery.mobile-1.1.0.min.css 的jQuery核心1.7.2 jquery.mobile-1.1.0.min.js
哪里是科尔多瓦1.6.0.js文件? – 2012-08-10 06:09:46
对不起@Coder_sLaY,这里是正确的代码。 – subho 2012-08-10 06:13:41
有ü把新cordova.plist,MainViewController和的AppDelegate文件到您的Xcode项目 – 2012-08-10 06:36:05