Sencha Touch 2 – Create a new application using terminal

This post allows you to understand that how to create your first application for the sencha touch 2.

Here are the steps that allows you to create a new application using the terminal/command line:


  • Sencha touch 2 downloaded.
  • Sencha Cmd installed.
  • MAMP already installed on the system.


  1. Navigate to the directory where you have extracted the contents of the package downloaded from the website. In case you are in a wrong directory and you try to create a new application, the script will be at halt and will show an error.
  2. Once navigated, type the following
    sencha -sdk /path/to/sencha-touch-sdk generate app MyApp /path/to/www/myapp
  3. On the completion of the script, the location specified in the above command will have the content as follows:

.sencha/                # Sencha-specific files (for example configuration)
    app/                # Application-specific content
        sencha.cfg      # Configuration file for Sencha Cmd
        plugin.xml      # Plugin for Sencha Cmd
    workspace/          # Workspace-specific content (see below)
        sencha.cfg      # Configuration file for Sencha Cmd
        plugin.xml      # Plugin for Sencha Cmd</code></strong></pre>
touch/ # A copy of the Sencha Touch SDK
 cmd/ # Sencha Touch-specific content for Sencha Cmd
 sencha.cfg # Configuration file for Sencha Cmd
 plugin.xml # Plugin for Sencha Cmd
 src/ # The Sench Touch source
 sencha-touch-*.js # Pre-compiled and bootstrap files

app # Your application's source code in MVC structure
 Main.js # The main view of the application

 app.css # The main stylesheet, compiled from app.scss

 app.scss # The Sass file which compiles to app.css above,
 # includes Sencha Touch theme by default

icons # Application icons for all mobile devices
 # When replacing these default images with your own,
 # make sure the file name and the dimension stays exactly the same
 loading # Application start-up screens for iOS devices
 # Similarly to icons, make sure the file names and
 # dimension stays the same
 images # Put other images used by your application here

 app.js # Contains application's initialization logics
 app.json # Configuration for deployment
 packager.json # Configuration for native packaging

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s