After a time, the Xcode file was built and saved as: myApp/platforms/ios/HelloWorld.xcodeproj. To build the default Cordova app, type: cordova build iosĨ. Cordova included several files for a default one-screen app, complete with splashscreen and icon. Open the /myApp/platforms folder to see a new folder, /ios.ħ. Now you need to download the specific files for iOS: cordova platform add iosĦ. CLI only downloaded the skeleton files needed for all platforms. Enter the new folder you created in Terminal with the cd (change directory) command: cd myAppĥ. Type the following in the terminal (“myApp” is this project’s app name - make your final app name less than 50 characters): cordova create myAppīasic files are generated in the /CordovaApps/myApp folder.Ĥ. This will orient all commands to that folder.įor this project, all of your commands will always begin with “cordova.”ģ. Open the Terminal app (click on its icon in the dock below, or click on the magnifying glass at top right and type in “terminal”), type cd and a space (for “change directory”), drag the selected folder to the Terminal screen, let go, click on the Terminal to select it, then hit Return. Open a Finder window and select the folder you want to create your project’s folder inside of, such as /CordovaAppsĢ.
When successful, you should get a long list of lines beginning with “npm http,” then finally ending with a series of words containing the symbol and digit/dot pairings, terminating with your username at the end.
I kept pasting the command and hitting Enter over and over until it completed (maybe three times). I got a series of ERR lines, ending with: npm ERR! not ok code 0
Or update your installation with this article: Ģ.
With Node.js installed, open the Terminal app by clicking on it in the dock at bottom and issue the following command: sudo npm install -g cordova
Xcode is a free download you can download now, but the Developer status comes at $99 a year and is needed if you want to submit apps to the app store or test on your device. Nevertheless, you can skip all those steps and still see your work in the the iOS Simulator included with Xcode - you just won’t be able to view the app in your device or App Store. Any updates to these programs may affect the following instructions.ĭownload Apple’s latest OS and Xcode if you haven’t already:īefore you can install the app you create with Cordova on your device, you need to sign up as a Developer with Apple and go through the business documentation, Certificate Signing, Developer Certificate process, and more, all of which are detailed on Apple’s web site ( ), under Prepare for App Submission. I am referencing “cordova” in the command-line interface, not “phonegap.” This project will not use the PhoneGap Build service.
In this article, I am referencing Mac OS X Yosemite 10.10.5 and Xcode 6.3.1 on a Mac Mini. This article assumes you’ve already followed the steps on to:
This article gets you up to speed on how to integrate your HTML/CSS/JS app with Cordova into an iOS app using a Mac and prepare it for App Store submission.