lib/Ext/core/Ext-more.js
function(config) {
        var appName = config.name,
            onReady, scope, requires;

        if (!config) {
            config = {};
        }

        if (!Ext.Loader.config.paths[appName]) {
            Ext.Loader.setPath(appName, config.appFolder || 'app');
        }

        requires = Ext.Array.from(config.requires);
        config.requires = ['Ext.app.Application'];

        onReady = config.onReady;
        scope = config.scope;

        config.onReady = function() {
            config.requires = requires;
            new Ext.app.Application(config);

            if (onReady) {
                onReady.call(scope);
            }
        };

        Ext.setup(config);
    }
function(config) {
        var appName = config.name,
            onReady, scope, requires;

        if (!config) {
            config = {};
        }

        if (!Ext.Loader.config.paths[appName]) {
            Ext.Loader.setPath(appName, config.appFolder || 'app');
        }

        requires = Ext.Array.from(config.requires);
        config.requires = ['Ext.app.Application'];

        onReady = config.onReady;
        scope = config.scope;

        config.onReady = function() {
            config.requires = requires;
            new Ext.app.Application(config);

            if (onReady) {
                onReady.call(scope);
            }
        };

        Ext.setup(config);
    }
@member Ext
@method application

Loads Ext.app.Application class and starts it up with given configuration after the page is ready.

Ext.application({
launch: function() {
alert('Application launched!');
}
});

See {@link Ext.app.Application} for details.

@param {Object} config An object with the following config options:

@param {Function} config.launch
A function to be called when the application is ready. Your application logic should be here. Please see {@link Ext.app.Application}
for details.

@param {Object} config.viewport
An object to be used when creating the global {@link Ext.Viewport} instance. Please refer to the {@link Ext.Viewport}
documentation for more information.

Ext.application({
viewport: {
layout: 'vbox'
},
launch: function() {
Ext.Viewport.add({
flex: 1,
html: 'top (flex: 1)'
});

Ext.Viewport.add({
flex: 4,
html: 'bottom (flex: 4)'
});
}
});

@param {String/Object} config.icon
Specifies a set of URLs to the application icon for different device form factors. This icon is displayed
when the application is added to the device's Home Screen.

Ext.application({
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'
},
launch: function() {
// ...
}
});

Each key represents the dimension of the icon as a square shape. For example: '57' is the key for a 57 x 57
icon image. Here is the breakdown of each dimension and its device target:

- 57: Non-retina iPhone, iPod touch, and all Android devices
- 72: Retina iPhone and iPod touch
- 114: Non-retina iPad (first and second generation)
- 144: Retina iPad (third generation)

Note that the dimensions of the icon images must be exactly 57x57, 72x72, 114x114 and 144x144 respectively.

It is highly recommended that you provide all these different sizes to accommodate a full range of
devices currently available. However if you only have one icon in one size, make it 57x57 in size and
specify it as a string value. This same icon will be used on all supported devices.

Ext.setup({
icon: 'resources/icons/Icon.png',
onReady: function() {
// ...
}
});

@param {Object} config.startupImage
Specifies a set of URLs to the application startup images for different device form factors. This image is
displayed when the application is being launched from the Home Screen icon. Note that this currently only applies
to iOS devices.

Ext.application({
startupImage: {
'320x460': 'resources/startup/320x460.jpg',
'640x920': 'resources/startup/640x920.png',
'640x1096': 'resources/startup/640x1096.png',
'768x1004': 'resources/startup/768x1004.png',
'748x1024': 'resources/startup/748x1024.png',
'1536x2008': 'resources/startup/1536x2008.png',
'1496x2048': 'resources/startup/1496x2048.png'
},
launch: function() {
// ...
}
});

Each key represents the dimension of the image. For example: '320x460' is the key for a 320px x 460px image.
Here is the breakdown of each dimension and its device target:

- 320x460: Non-retina iPhone, iPod touch, and all Android devices
- 640x920: Retina iPhone and iPod touch
- 640x1096: iPhone 5 and iPod touch (fifth generation)
- 768x1004: Non-retina iPad (first and second generation) in portrait orientation
- 748x1024: Non-retina iPad (first and second generation) in landscape orientation
- 1536x2008: Retina iPad (third generation) in portrait orientation
- 1496x2048: Retina iPad (third generation) in landscape orientation

Please note that there's no automatic fallback mechanism for the startup images. In other words, if you don't specify
a valid image for a certain device, nothing will be displayed while the application is being launched on that device.

@param {Boolean} config.isIconPrecomposed
True to not having a glossy effect added to the icon by the OS, which will preserve its exact look. This currently
only applies to iOS devices.

@param {String} config.statusBarStyle
The style of status bar to be shown on applications added to the iOS home screen. Valid options are:

* `default`
* `black`
* `black-translucent`

@param {String[]} config.requires
An array of required classes for your application which will be automatically loaded if {@link Ext.Loader#enabled} is set
to `true`. Please refer to {@link Ext.Loader} and {@link Ext.Loader#require} for more information.

Ext.application({
requires: ['Ext.Button', 'Ext.tab.Panel'],
launch: function() {
// ...
}
});

@param {Object} config.eventPublishers
Sencha Touch, by default, includes various {@link Ext.event.recognizer.Recognizer} subclasses to recognize events fired
in your application. The list of default recognizers can be found in the documentation for {@link Ext.event.recognizer.Recognizer}.

To change the default recognizers, you can use the following syntax:

Ext.application({
eventPublishers: {
touchGesture: {
recognizers: {
swipe: {
// this will include both vertical and horizontal swipe recognizers
xclass: 'Ext.event.recognizer.Swipe'
}
}
}
},
launch: function() {
// ...
}
});

You can also disable recognizers using this syntax:

Ext.application({
eventPublishers: {
touchGesture: {
recognizers: {
swipe: null,
pinch: null,
rotate: null
}
}
},
launch: function() {
// ...
}
});

@param {Function} config.onUpdated
This function will execute once the production microloader determines there are updates to the application and has
merged the updates into the application. You can then alert the user there was an update and can then reload
the application to execute the updated application.

Ext.application({
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();
}
}
);
}
});