Sencha Touch 2 and phonegap - how to launch the application

Does anyone have an example code on how to start the ST2 application from a phone saver? I can only find the ST1 tutorials and could not get them to work.

I have my working ST2 application with my code in app.js - it seems to me that I need to use the ondeviceready event, but I donโ€™t know where to do it.

thanks

+4
source share
5 answers

Even if you do not need the phonegap API, you should use the Phonegap construct:

a. Build the Sencha application using the phonegap-build site. It is free, easy and simple. see details below.

b. See the Sencha Native API tutorial here . http://docs.sencha.com/touch/2-0/#!/guide/native_apis

More details

Use the free Phonegap-Build website . Its fantastic.

a. Use it if you need special functionality - AFAIK Sencha Native is missing contacts - please correct me if I am wrong.

b. Use it because you need a free online utility for free online telephony that gives you instant compiled code for iphone, Android, Windows mobile, blackberry (!) Etc.

How to compile Sencha application on Phonegap-build

a. You will delete the phonegap.js file (or cordova-xxx.js file) from the folders.

b. You should have a link to the phone difference in your app.html application. If it is there, leave it. If you do not add the following line after the link to css.

<script type="text/javascript" id="phonegap" src="cordova-1.7.0.js"></script> 

with. You will copy app.html to the new index.html file (I have not tried RENAME, not COPY, but it will probably work too)

e. Download the credentials from the Apple developer, which you can create from your PC using open SSL.

e. You will archive your directory, and on the phonegap-build website, modify and upload this zip code.

Sencha compiled code works on all devices (iphone, Android, Blackberry Touch, etc.)!

to use

+4
source

I found the easiest option: create an application in the www directory of your Xcode project using the Sencha Touch SDK.

The command I use is:

 sencha app build production 

You can change the output directory of your production assembly in your application. json

The manual in the ST2 docs is pretty good: http://docs.sencha.com/touch/2-0/#!/guide/command

Remember to include Phonegap in your new index.html file:

 <script type="text/javascript" charset="utf-8" src="cordova-1.5.0.js"></script> 

You do not need to do anything special with telephony to run it. If it works in chrome, then this should also not be a problem on the device.

+2
source

I have the same problem as the native iPhone packaging works with sencha touch 2. This tutorial does not answer my question: http://www.sencha.com/blog/sencha-touch-2-rc-native-packaging/

+1
source

Since they release ST2 RC, here you can find examples of Sencha-Touch 2 applications

http://www.sencha.com/blog/sencha-touch-2-rc-native-packaging/

0
source

As far as I know, Sencha Touch 2 no longer uses the ondeviceready function, old tutorials are now not so useful. I suggest you follow this guide to get the first steps in programming MVC sencha / phonegap.

http://miamicoder.com/2012/how-to-create-a-sencha-touch-2-app-part-1/

-1
source

Source: https://habr.com/ru/post/1383158/


All Articles