Sencha Touch does not initialize

MY sencha touch works fine in all browsers, however, when I save the url on the main screen of the iPad. It does not load and displays only a blank screen. I don't get JS errors, and when debugging, nothing happens through the log. Here is an example application:

script type="text/javascript">
    var rootPanel;
    if (navigator.userAgent.match(/iPad/i)) {
        viewport = document.querySelector("meta[name=viewport]");
        viewport.setAttribute('content', 'width=980');
    }
    Ext.application({
        launch: function () {



            var contactForm = Ext.create('Ext.form.FormPanel', {
                standardSubmit: true,
                fullscreen: true,
                items: [{
                    xtype: 'titlebar',
                    title: 'My App',
                    docked: 'top'
                }, {
                    xtype: 'fieldset',
                    items: [{
                        xtype: 'textfield',
                        name: 'LoginName',
                        label: 'Login Name:'
                    }, {
                        xtype: 'passwordfield',
                        name: 'Password',
                        label: 'Password:'
                    },
                    {
                        xtype: 'hiddenfield',
                        name: 'ReturnUrl',
                        value: '/returnUser.html'
                    }] // items
                }, {
                    xtype: 'toolbar',
                    layout: {
                        pack: 'center'
                    }, // layout
                    ui: 'plain',
                    items: [{
                        xtype: 'button',
                        text: 'Reset',
                        ui: 'decline',
                        handler: function (btn, evt) {
                            Ext.Msg.confirm('', 'Are you sure you want to reset this form?', function (btn) {
                                if (btn === 'yes') {
                                    contactForm.setValues({
                                        LoginName: '',
                                        Password: ''
                                    }); // contactForm()
                                } // switch
                            }); // confirm()
                        }
                    }, {
                        xtype: 'button',
                        text: 'Submit',
                        ui: 'confirm',
                        handler: function (btn, evt) {
                            var values = contactForm.getValues();

                            contactForm.submit({
                                url: 'Login',
                                method: 'POST',
                                waitTitle: 'Connecting',
                                waitMsg: 'Sending data...',
                                success: function (form, result) {
                                    Ext.Msg.alert('Login succeeded!', result.response.reason);
                                },
                                failure: function (form, result) {
                                    Ext.Msg.alert('Login Failed!', result.response.reason);
                                }
                            });

                        } // handler
                    }] // items (toolbar)
                }] // items (formpanel)
            }); // create()
        } // launch
    }); // application()


    $(document).ready(function () {

    });

I set a warning in the start method Ext.Application, but it does not appear. When I put this warning in the function document.readythat it shows. I should also note that DOES works in the ipad browser, just not when starting from the icon on the main screen.

+5
source share
2 answers

, sencha, , 2.1.0, , (2.1.1 Build Date 2013-02-05 12:25:50), .

0

, - , Ext.Loader . , . script Ext.application ,

Ext.Loader.setConfig({
    enabled:true
});

Ext.application({...});
+1

All Articles