官术网_书友最值得收藏!

Time for action – Build it for different smart phones

It's time to make the first build for our application and see the magic that the Rhogen command has done. We will build our employee application for iPhone, Android, and Blackberry.

Let's go to the application directory and build it for iPhone, Blackberry, Android, and Windows phone:

$ cd employee_application

We will now learn about the rake command, which will help us when building our application. To get all the options available with the rake command, go to your application directory and type:

rake -T

You will get a list of all the options available with rake command:

rake clean:android              # Clean Android
rake clean:bb                   # Clean bb
rake clean:iphone               # Clean iphone
rake clean:win32                # Clean win32
rake clean:wm                   # Clean wm
rake clobber_rdoc               # Remove rdoc products
rake config:checkbb             # Check local blackberry configuration
rake device:android:debug       # Build debug self signed for device
rake device:android:production  # Build production signed for device
rake device:bb:debug            # Build debug for device
rake device:bb:production       # Build production for device
rake device:iphone:production   # Builds and signs iphone for production
rake device:wm:production       # Build production for device or emulator
rake package:bb:production_sim  # Package all production (all parts in one ...
rake run:android                # build and launch emulator
rake run:android:device         # build and install on device
rake run:bb                     # Builds everything, loads and starts bb si...
rake run:bb:startsim            # Start Blackberry simulator
rake run:bbapp                  # Builds everything and loads application o...
rake run:bbdev                  # Same as run:bb, but only supports 
one app...
rake run:iphone                 # Builds everything, launches iphone simulator
rake run:win32                  # Run win32
rake run:wm                     # Build and run on WM6 emulator
rake run:wm:cab                 # Build, install .cab and run on WM6 emulator
rake run:wm:device              # Build and run on the Windows Phone
rake run:wm:device:cab          # Build, install .cab  and run on the Windo...
rake uninstall:android          # uninstall from emulator
rake uninstall:android:device   # uninstall from device

Now, we will use the following commands for building the application for different phones:

  1. For building it for iPhone, we will use the following command and then our employee application will start in an iPhone simulator:
    $ rake run:iphone
    
  2. For building it for Blackberry, we will use the following command and then our employee application will start in the Blackberry simulator:
    $rake run:bb
    
  3. For building it for Android we will use the following command and then our employee application will start in the Android simulator:
    $rake run:android
    
  4. To build it for other phones we can use the following commands:
    • Windows Mobile
      rake run:wm
    • Windows 7
      rake run:wp

What just happened?

We have just run our cross-platform employee application on various smart phones and tested it on device simulators. We have also seen how they will appear on the iPhone, Blackberry, and Android.

主站蜘蛛池模板: 常州市| 武汉市| 谷城县| 屯留县| 陆良县| 刚察县| 探索| 即墨市| 正定县| 霍林郭勒市| 宜良县| 姚安县| 东台市| 常山县| 来宾市| 苍山县| 漠河县| 广灵县| 东乡族自治县| 通州市| 静海县| 乐清市| 寿光市| 乌拉特中旗| 木里| 安达市| 石屏县| 砀山县| 绥宁县| 基隆市| 南乐县| 镇原县| 广平县| 全南县| 富源县| 瑞丽市| 永城市| 连江县| 云安县| 隆安县| 泌阳县|