...
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
- Navigate to the folder where you downloaded PhoneGap 2.50. Find the phonegap-2.5.0.zip file and extract its contents.
- Expand this folder and navigate to phonegap-2.5.0 > lib > ios directory.
- The ios directory is where we will be working to create a new project.
Open Terminal
- Open a new Terminal window.
- 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.
...
- uMobile currently supports three different authentication strategies: CAS, Local & Mock.
- Each strategy has a cooresponding configuration file under the umobile-ui/config/js directory (i.e., cas.js, local.js and mock.js).
- Choose one of the three authentication strategies. For this documentation, we will use local.js.
- Open local.js.
- Set config.uMobileServerUrl to http://localhost:8080.
- Set config.loginFn to localLogin.
- Set config.uMobileServerUrl to http://localhost:8080.
Configure Build Process
- Navigate to the umobile-ui/config directory.
- Open the config.json file in an editor of your choice.
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" }
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.
Code Block grunt prod --environment=ios --auth=local
- ...
...