Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Setup iOS Development Environment

Requirements

  1. Apple OSX development environment.
  2. Download XCode 4.6.
  3. Download PhoneGap 1.70.
  4. Download & run uMobile 1.1RC1 quickstart.

Creating the Project

  1. Open XCode. Choose File > New > Project.
  2. Select Cordova-based Application from the list of templates.
     
  3. Enter the following options on the next screen:
    1. Product Name: uMobile
    2. Organization Name: Your organization's name
    3. Company Identifier: org.jasig.umobile.phonegap.ios
    4. Check: Use Automatic Reference Counting
     
  4. Choose a location for your project.
     
  5. Disable Automatic Reference Counting in the build.
    1. Select uMobile under Targets in the main project view.
    2. Click on the Build Settings tab.
    3. Make sure the All and Combined filters are selected.
    4. Search for reference in the search bar.
    5. Set the Objective-C Automatic Reference Counting property to No.

  6. Check the uMobile source out into the new project directory.

    git clone git@github.com:Jasig/umobile-app-phonegap umobile-ios
  7. Copy the iPhone-specific Cordova Javascript file to "cordova.js".

    cd umobile-ios
    cp www/lib/external/cordova-iphone-1.7.0rc1.js www/lib/external/cordova.js
  8. Open the coned GitHub clone in Finder, then drag the www folder into the top of the XCode project with your mouse.

  9. Configure cordova.plist by setting OpenAllWhitelistURLsInWebView to true.  Next, add the hostname of your uMobile server, any authentication server, and any other servers hosting uMobile resources to ExternalHosts.  If you're working with the uMobile application server quickstart, you can simply add localhost to the list. Under Plugins add Key: SessionTracking, String: SessionTracking.

  10. Add SessionTracking Plugin files into the Plugins folder: SessionTracking.h and SessionTracking.m

  11. Configure www/config.js.  If you're working with the quickstart, set the value of config.uMobileServerUrl to http://localhost:8080.

  12. Overwrite the file /Classes/MainViewController.m with this one: MainViewController.m

  13. Set the scheme at the top of the project to iPhone 5.1 Simulator and run the project!

Debugging

uMobile logs helpful events and errors.  You can access the log by viewing the console output.

  • No labels