Sencha touch 2 native build not loading

ios, javascript, json, sencha-touch-2

Solution

Change the `"logger": "no"` to `"logger": "false"` in `app.json`. When you're done it should look like this:

"buildOptions": {
    "product": "touch",
    "minVersion": 3,
    "debug": false,
    "logger": "false"
},

Then rebuild again with `sencha app build native`. You can reproduce the same error in the browser with `sencha app build production` then point your browser to `http://localhost/path/to/myapp/build/production`. If you do, you'll have to clear your browser cache before it'll work (on chrome: wrench->tools-developer tools->local storage->hostname->X (for delete).

Problem

After generating the default app with: ``` sencha generate app Sencha ../Sencha ``` I decided to test the app on the iOS simulator ``` cd ../Sencha/ sencha app build native ``` It loads the app but gets stuck on the loading icon: Below is the code for the main application (App.js): ``` Ext.application({ name: 'Sencha', requires: [ 'Ext.MessageBox' ], views: ['Main'], icon: { '57': 'resources/icons/Icon.png', '72': 'resources/icons/Icon~ipad.png', '114': 'resources/icons/Icon@2x.png', '144': 'resources/icons/Icon~ipad@2x.png' }, isIconPrecomposed: true, startupImage: { '320x460': 'resources/startup/320x460.jpg', '640x920': 'resources/startup/640x920.png', '768x1004': 'resources/startup/768x1004.png', '748x1024': 'resources/startup/748x1024.png', '1536x2008': 'resources/startup/1536x2008.png', '1496x2048': 'resources/startup/1496x2048.png' }, launch: function() { // Destroy the #appLoadingIndicator element Ext.fly('appLoadingIndicator').destroy(); // Initialize the main view Ext.Viewport.add(Ext.create('Sencha.view.Main')); }, onUpdated: function() { Ext.Msg.confirm( "Application Update", "This application has just successfully been updated to the latest version. Reload now?", function(buttonId) { if (buttonId === 'yes') { window.location.reload(); } } ); } }); ``` Below is the code for the main view (Main.js): ``` Ext.define("Sencha.view.Main", { extend: 'Ext.tab.Panel', requires: [ 'Ext.TitleBar', 'Ext.Video' ], config: { tabBarPosition: 'bottom', items: [ { title: 'Welcome', iconCls: 'home', styleHtmlContent: true, scrollable: true, items: { docked: 'top', xtype: 'titlebar', title: 'Welcome to Sencha Touch 2' }, html: [ "You've just generated a new Sencha Touch 2 project. What you're looking at right now is the ", "contents of <a target='_blank' href=\"app/view/Main.js\">app/view/Main.js</a> - edit that file ", "and refresh to change what's rendered here." ].join("") }, { title: 'Get Started', iconCls: 'action', items: [ { docked: 'top', xtype: 'titlebar', title: 'Getting Started' }, { xtype: 'video', url: 'http://av.vimeo.com/64284/137/87347327.mp4?token=1330978144_f9b698fea38cd408d52a2393240c896c', posterUrl: 'http://b.vimeocdn.com/ts/261/062/261062119_640.jpg' } ] } ] } }); ```

Original source