0
我試圖在實際設備iPhone 5s iOS 7.0.6上運行phonegap(3.3.0)+ requirejs應用程序。它可以像預期的那樣在模擬器上完美運行,但不會在設備上顯示任何內容。Phonegap應用程序無法在iPhone iOS 7上運行
這是我的requirejs數據主文件。
require(["fastclick", 'backbone', 'app/router','app/namespace'], function (FastClick, Backbone, AddaRouter, App) {
"use strict";
document.addEventListener("deviceready",onDeviceReady,false);
function onDeviceReady(){
FastClick.attach(document.body);
var router = new AddaRouter();
Backbone.View.prototype.goTo = function (loc) {
router.navigate(loc, true);
};
Backbone.history.start({ silent: true });
// check is the user is new. Is new then go to signup page
window.localStorage.removeItem("isNew");
if(!window.localStorage.getItem("isNew")){
router.navigate('registration', true);
}else{
if(Api.createSession()){
router.navigate('contacts', true);
}else{
router.navigate('registration', true);
}
}
}
});
注意:如果我保持外部任何需要封鎖的東西,它可以在設備上工作。
你有沒有試過在一堆alert()語句中粘貼代碼失敗並在設備上運行它? – Rocklan