Versions Compared

Key

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

...

The PhoneGap website has an excellent iOS start up guide. It is recommended but not mandatory that you walk through their startup guide before continuing to familiarize yourself with the overall process.

Creating the Project

Extract PhoneGap
  1. Navigate to the folder where you downloaded PhoneGap 2.50. Find the phonegap-2.5.0.zip file and extract its contents.
  2. Expand this folder and navigate to phonegap-2.5.0 > lib > ios directory.
  3. The ios directory is where we will be working to create a new project.
Open Terminal
  1. Open a new Terminal window.
  2. In the Terminal window, navigate to the ios > bin directory from the extracted PhoneGap code base.
Create a Project from the Terminal

There are 3 ordered, required parameters for creating a project from the command line. For more detailed information on these parameters visit the PhoneGap iOS start up guide.

...

  1. uMobile currently supports three different authentication strategies: CASLocal & Mock.
    1. Each strategy has a cooresponding configuration file under the umobile-ui/config/js directory (i.e., cas.jslocal.js and mock.js).
    2. Choose one of the three authentication strategies. For this documentation, we will use local.js.
    3. Open local.js.
      1. Set config.uMobileServerUrl to http://localhost:8080.
      2. Set config.loginFn to localLogin.
Configure Build Process
  1. Navigate to the umobile-ui/config directory.
  2. Open the config.json file in an editor of your choice.
  3. Set the external property to the path of your root project's www file directory. See the below code snippet for an example:

    Code Block
    {
    	"port": 5000,
    	"environment": "web",
    	"auth": "mock",
    	"mode": "dev",
    	"less": {
    		"dest": "./src/css",
    		"src": "./src/less",
    		"prefix": "/css",
    		"debug": true
    	},
    	"external": "../../www"
    }
    
  4. 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 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.

    Code Block
    grunt prod --environment=ios --auth=local
  5. ...

...