Anyone knows why is thrown this error launching iphone simulator? on Android emulator works fine.
// Include global objects Ti.include( // App level files 'lib/app.js', 'lib/api.js', // Models 'models/items.js', 'models/Master.js', 'models/Detail.js', 'models/Search.js', 'models/SearchMaster.js', 'models/Favorites.js', // UI 'ui/common/MasterView.js', 'ui/common/DetailView.js', 'ui/common/SearchView.js', 'ui/common/Search2View.js', 'ui/common/Search3View.js', 'ui/common/itemBar.js', 'ui/common/MenuView.js', 'ui/common/Help.js', 'ui/common/About.js', 'ui/handheld/android/TopBar.js', 'ui/handheld/ios/NavBar.js', 'ui/handheld/ios/Sharer.js', // android Controllers, 'controllers/android/Master.js', 'controllers/android/Detail.js', 'controllers/android/Search.js', 'controllers/android/Search2.js', 'controllers/android/Search3.js', 'controllers/android/SearchMaster.js', 'controllers/android/Favorites.js', // ios controllers 'controllers/ios/Master.js', 'controllers/ios/Detail.js', 'controllers/ios/Search.js', 'controllers/ios/Search2.js', 'controllers/ios/Search3.js', 'controllers/ios/SearchMaster.js', 'controllers/ios/Favorites.js' ); // detectamos en qué plataforma se está ejecutando la aplicación //bootstrap and check dependencies if (Ti.version < 1.8 ) { alert('Sorry - this application requires Titanium Mobile SDK 1.8 or later'); } (function() { //determine platform and form factor and render approproate components var osname = Ti.Platform.osname, version = Ti.Platform.version, height = Ti.Platform.displayCaps.platformHeight, width = Ti.Platform.displayCaps.platformWidth; //considering tablet to have one dimension over 900px - this is imperfect, so you should feel free to decide //yourself what you consider a tablet form factor for android var isTablet = osname === 'ipad' || (osname === 'android' && (width > 899 || height > 899)); if (isTablet) { App.type = 'tablet'; } else { // iPhone and Mobile Web make use of the platform-specific navigation controller, // all other platforms follow a similar UI pattern if (osname === 'iphone') { App.type = 'iphone'; } else if (osname == 'mobileweb') { App.type = 'mobileweb'; } else { App.type = 'android'; } } })(); // creamos los controladores específicos if(App.type=='android'){ App.master = new App.Controllers.android.Master(); App.detail = new App.Controllers.android.Detail(); App.search = new App.Controllers.android.Search(); App.search2 = new App.Controllers.android.Search2(); App.search3 = new App.Controllers.android.Search3(); App.searchMaster = new App.Controllers.android.SearchMaster(); App.favorites = new App.Controllers.android.Favorites(); }; if(App.type=='iphone'){ App.master = new App.Controllers.ios.Master(); App.detail = new App.Controllers.ios.Detail(); App.search = new App.Controllers.ios.Search(); App.search2 = new App.Controllers.ios.Search2(); App.search3 = new App.Controllers.ios.Search3(); App.searchMaster = new App.Controllers.ios.SearchMaster(); App.favorites = new App.Controllers.ios.Favorites(); }; // iniciamos la base de datos local App.API.dbIni(); // conectamos con el servidor para recoger la estructura de las distintas secciones, temas, colectivos y ámbitos. App.serverUrl = "http://sid.usal.es/api/"; var request = require('lib/http').request; var opts = {}; opts.Type = 'GET'; opts.url = App.serverUrl+"getTrees.php"; opts.callback = App.API.treePush; request(opts); // abrimos el controlador de la pantalla inicial App.master.open(); // Eventos globales del sistema Ti.Gesture.addEventListener('orientationchange', App.orientationObserverUpdate); Ti.Network.addEventListener('change', App.networkObserverUpdate); Ti.App.addEventListener('resume', App.resumeObserverUpdate);
3 Answers
my guess is one of the files that it is trying to include iOS doesn't like. To try and narrow it down, might want to throw each file into its own include statement and see what/if one is the actual root cause.
if I leave the app.js file in blank, it throws the same error
It appears to be a failed copy through Dropbox. Thanks for the answer
Your Answer
This question has been locked and cannot accept new answers.