Created
April 23, 2012 14:45
-
-
Save umrashrf/2471373 to your computer and use it in GitHub Desktop.
Integrating Sencha Touch 2.0 application with PhoneGap/Cordova
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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