Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Creating the Project

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

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

    Image Added

  10. Run the build process for the uMobile source code. The build process configures the uMobile source code with the necessary dependencies needed to run in a given environment. Currently, the uMobile project supports Android, iOS and Web platforms. Once the build completes a www directory will be added to the umobile-ui directory. The www directory houses the production ready code base to be used with the PhoneGap wrapper.

    Code Block
     cd umobile-ui sudo npm install grunt --environment=iphone

     

  11. ...
  12. ...
  13. ...
  14. ...
  1. Code Block
    cd umobile-ios
    cp www/lib/external/cordova-iphone-1.7.0rc1.js www/lib/external/cordova.js
  2. Open the coned GitHub clone in Finder, then drag the www folder into the top of the XCode project with your mouse.


  3. 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.

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

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

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

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

...