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

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.

主站蜘蛛池模板: 交城县| 泰顺县| 兴安盟| 象州县| 吉木萨尔县| 溆浦县| 威信县| 莆田市| 唐海县| 光山县| 开化县| 长垣县| 封丘县| 新巴尔虎右旗| 兴国县| 蕉岭县| 开阳县| 遂宁市| 德江县| 桃源县| 商丘市| 诏安县| 桓仁| 错那县| 微山县| 建湖县| 嘉峪关市| 南澳县| 太原市| 庆元县| 久治县| 海安县| 甘肃省| 醴陵市| 三河市| 枝江市| 旬阳县| 涡阳县| 安龙县| 阿拉尔市| 宣汉县|