You can build, clean, and launch an emulator with a single command. The iOS command-line tools are built upon shell scripts and rely on XCode command-line tools such as xcode-select and xcodebuild
Generate Mobile output for iOS
Go to
mobile
directoryRun the command :
$ ant mobile.iOS
Then locate to
mobile/iOS
directory.
Create a project :
Run the create command with the following parameters:
Path to your new Cordova iOS project
Package name, following reverse-domain style convention
Project name
$ ./path/to/cordova-ios/bin/create \ /path/to/my_new_cordova_project \ com.example.cordova_project_name \ CordovaProjectName
Ex: $ bin/create ~/Desktop/Mobile \ docbook.xsl.Mobile Mobile
Important
Go to newly created iOS project path/to/my_new_cordova_project
and replace www
directory with mobile/www
directory.
Build a project :
Locate to /path/to/my_new_cordova_project
directory. For above
example, move to ~/Desktop/Mobile
.
$ /path/to/my_new_cordova_project/cordova/debug
Ex: $ cordova/debug
Launch Emulator :
$ /path/to/my_new_cordova_project/cordova/emulate
Ex: $ cordova/emulate
Logging :
$ /path/to/my_new_cordova_project/cordova/log
Ex: $ cordova/log