Versions Compared

Key

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

...

  1. In a Terminal window, navigate to the umobile-ui directory.
  2. Execute the below command in the Terminal window.

    Code Block
    grunt prod --environment=ios --auth=local
  3. The above command starts 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 AndroidiOS 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. Please see the documentation on the uMobile HTML5 build for more information on configuring the build script.

  4. Once built, execute the below command to push the built code to the PhoneGap www directory.

    Code Block
     grunt push.prod
  5. Your project directory should like similar to below graphic:
    Image Added 

 

 

Creating the Project

...

 

...

  1. uMobile currently supports three different authentication strategies: CASLocal & Mock.
  2. Each strategy has a cooresponding configuration file under the umobile-ui/config/js directory (i.e., cas.jslocal.js and mock.js).
  3. Choose one of the three authentication strategies. For this documentation, we will use cas.js.
  4. Open cas.js.
    1. Set config.uMobileServerUrl to http://localhost:8080.
    2. Set config.loginFn to casLogin.
    3. Note: There are bugs with the current login functionality. Only view the portal using the guest layout. This is being addressed.

...

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. Please see the documentation on the uMobile HTML5 build for more information on configuring the build script.

 

...

  1. In XCode, under the Project Navigator, navigate to uMobile > Supporting Files > Cordova.plist.
  2. Under the Root Key:
    1. Set OpenAllWhitelistURLsInWebView to Yes.
  3. Under the ExternalHosts Key:
    1. Add the hostname, any authentication servers and any other servers hosting uMobile resources.
    2. If you're working with the uMobile quickstart, you can just add localhost.
  4. Under the Plugin Key:
    1. Plugin: SesssionTracking
    2. Type: String
    3. Value: SessionTracking

...

  1. SessionTracking.h
  2. SessionTracking.m

...

Run uMobile with the iOS Simulator

  1. In Finder, navigate to your project location. For this tutorial, our project is housed under the Documents > umobile-phonegap-ios directory.
  2. Double click the uMobile.xcodeproj file. This will open the xCode editor.
  3. Set the scheme at the top of the project to iPhone 6.1 Simulator and run the project!

Debugging

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