Reputation: 148
I'm trying to run a phonegap(3.3.0)+requirejs app on actual device iPhone 5s iOS 7.0.6. It runs perfectly on simulator as expected but doesn't show anything on the device.
here's my data-main file for 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);
}
}
}
});
Note: if I keep anything outside require block it works on the device.
Upvotes: 0
Views: 182
Reputation: 148
I figured out the problem. It's the name of one of the js files. It wasn't detected in the simulator since my filesystem is case insensitive.
Upvotes: 1