2014-03-02 131 views
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); 
     } 
    } 


    } 


}); 

注意:如果我保持外部任何需要封锁的东西,它可以在设备上工作。

+0

你有没有试过在一堆alert()语句中粘贴代码失败并在设备上运行它? – Rocklan

回答

1

我想出了这个问题。这是一个js文件的名称。它在模拟器中未被检测到,因为我的文件系统不区分大小写。

相关问题