Skip to content

Instantly share code, notes, and snippets.

@umrashrf
Created April 23, 2012 14:45
Show Gist options
  • Save umrashrf/2471373 to your computer and use it in GitHub Desktop.
Save umrashrf/2471373 to your computer and use it in GitHub Desktop.
Integrating Sencha Touch 2.0 application with PhoneGap/Cordova
function loadApp() {
Ext.Loader.setConfig({
enabled: true
});
Ext.application({
name: 'SenchaFiddle',
launch: function() {
Ext.create('Ext.Panel', {
fullscreen: true,
html: 'Hello from your first Sencha Touch App made by Sencha Fiddle.'
});
}
});
}
function onDeviceReady() {
// phonegap plugin stuff if any
// loading sencha touch app
loadApp();
}
if(Ext.os.is.iOS) {
// it will be called only if it's iOS device, you can make it Android or BlackBerry depending on your need
document.addEventListener("deviceready", onDeviceReady, false);
} else {
loadApp();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment