Anyone have sample code on how to launch a ST2 app from phonegap? I can only find ST1 tutorials and have not been able to make them work.
I have my working ST2 app with my code in app.js – I guess I need to use the ondeviceready event but not sure where to do so.
Thanks
Even if you don’t need phonegap API its worth using Phonegap build:
a. Build your Sencha App with phonegap-build website. Its free, easy and great.
see details below.
b. See Sencha Native API tutorial here. http://docs.sencha.com/touch/2-0/#!/guide/native_apis
Details
Use the Phonegap-Build free website. Its fantastic.
a. Use it if you need phonegap specific functionality
— AFAIK Sencha Native is missing contacts – please correct me if I’m wrong.
b. Use it because you want the fantastic phonegap-build free online utility, that gives you immediate compiled code for iphone, Android, Windows mobile, blackberry(!) and more.
How to compile you Sencha app on Phonegap-build
a. You REMOVE the phonegap.js (or cordova-xxx.js file) from the folders.
b. You must have a ref to the phonegap in your app.html.
If its there, leave it. If not add the following line after the link to the css.
c. You copy the app.html to a new index.html file (I didn’t try RENAME rather than COPY but it probably will work too)
d. And upload the credentials from apple developer – which you can create from a PC using open SSL.
e. You zip your directory, and in the phonegap-build site Edit and upload this zip.
The compiled Sencha code works on all the devices (iphone, android, blackberry touch etc)!
enjoy