A streamlined workflow is something that can benefit us all greatly by speeding up our processes and reducing the amount of manual work needed to complete a task.
In this recipe, we will explore the command-line tools available in Cordova for creating and running iOS applications from the terminal application:
Create a new Cordova iOS project by running the following command:
cordova create hello com.example.hello HelloWorld
Change the directory to the newly created project:
cd hello
Add the iOS platform to the project:
cordova platform add ios
Open the project directory in the explorer, and you should see something like this:
Open the
/platform/ios
directory and double-click onHelloWorld.xcodeproj
. So, the project will be opened in Xcode, as shown here:If we choose to run the newly opened project via Xcode on a simulated device, the output will look something like this: