Roggie
Roggie

Reputation: 1217

How to getting started with Phonegap and Sencha Touch?

I would like to develop a mobile applications using Phonegap and Sencha Touch.

I understand that they compliment each other for the best outcome.

How do I get started with respect to what needs to be installed and in what order?

Upvotes: 0

Views: 497

Answers (2)

now_world
now_world

Reputation: 1096

Created this doc when I had the same problem:

How to create a Sencha touch App for Android This document describes how to create, edit, and run a Sencha Touch App on an Android device. The project is created with Sencha Command and Apache Cordova. Additional instructions and documentation can be found here: http://docs.sencha.com/cmd/5.x/cordova_phonegap.html

Prerequisites

Java JRE

Java JRE can be downloaded and installed from: http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html

Node.js

Node.js can be downloaded and installed from: http://nodejs.org/download/

Android Debugging Settings

To prepare an Android device for running an Sencha Touch App make sure you go to Settings > Developer Options. Then be sure to have “USB Debugging,” “Stay Awake,” and “Verify apps over USB” tick boxes checked.

Sencha Touch SDK

http://www.sencha.com/products/touch/download/

  1. Install Apache Cordova with the following command: “npm install –g cordova” Note: If you’re on a Mac, you may need to include “sudo”
  2. Download and install Sencha cmd if not already installed. http://www.sencha.com/products/sencha-cmd/
  3. Fulfill target device platform-specific requirements a. Android: Download and install the Android SDK Manager. http://developer.android.com/sdk/index.html
  4. From your Sencha Touch SDK directory create your application using the Cmd generate command as follows: “sencha -sdk /path/to/Framework generate app MyApp /path/to/MyApp”
  5. Navigate to your newly generated project folder and run: “sencha cordova init com.mycompany.MyApp MyApp”
  6. You should now see cordova directory in the project folder after the above command completes.
  7. You should also see a block for Cordova in your project’s app.json file. app.json is located at the root of your project. This is where you can set the platform for which you are building. A build object similar to the following should now be present in your app.json file:

"builds": { "native": { "packager": "cordova", "cordova" : { "config": { //"platforms": "ios android", "id": "com.mydomain.MyApp", "name": "myApp" } } } }

It is worth noting that the word “native” is simply your build’s name and can be anything you like. Platforms You can then set the platforms object to be any platform, or combination of platforms. For Cordova, you can specify a space delimited list, for example “ios android”. ID The ‘id’ property will be used when the Cordova application is first generated. This will be the identifier for your application. That said, you will want to make sure you have picked this correctly. If you need to change it, you will want to delete the Cordova folder from your project and let Cmd regenerate it after you have changed the ID property. This is especially important for iOS application as this must match your Bundle Identifier.

  1. Run: “sencha app build {build-name}”
  2. sencha app run {build-name}
  3. Thats it! Sencha Cmd will now create a Cordova application and build the platform you specified via the platforms property in app.json.

Upvotes: 1

Amar1989
Amar1989

Reputation: 512

you can go through sencha docs site you will get everything, they have proper documentation. http://docs.sencha.com/touch/2.4/getting_started/getting_started.html

you can test you sencha app using chrome by hosting sencha app on tomat server.

Upvotes: 1

Related Questions