gpt4 book ai didi

ios - Phonegap 应用程序无法在 iPhone iOS 7 上运行

转载 作者:行者123 更新时间:2023-11-29 03:12:19 25 4
gpt4 key购买 nike

我正在尝试在实际设备 iPhone 5s iOS 7.0.6 上运行 phonegap(3.3.0)+requirejs 应用程序。它按预期在模拟器上完美运行,但在设备上没有显示任何内容。

这是我的 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);
}
}


}


});

注意:如果我将任何东西放在 require block 之外,它就可以在设备上运行。

最佳答案

我发现了问题。这是其中一个 js 文件的名称。由于我的文件系统不区分大小写,因此在模拟器中未检测到它。

关于ios - Phonegap 应用程序无法在 iPhone iOS 7 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22130396/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com