Search This Blog

Sunday, June 28, 2015

Set up Ionic in Mac OS X Yosemite

1. Here is the official guide:

2. Go to App Store, download Xcode and install it

3. Open Xcode

4. Xcode Menu → Preferences → Downloads → Components → iOS 8.2 Simulator (there are a few others, so pick iOS 8 that can run on iPhone 6)

5. Install Xcode Command Line Tools: Open a Terminal, type “xcode-select —install”

6. Install nodejs,, downlod “Mac OS X Installer (.pkg)”, open the download file and follow the installer to install Nodejs

7. Install cordova tool chains, open a Terminal, and type “sudo npm install -g cordova”

8. In a terminal, create a sample app, type “cordova create hello com.example.hello HelloWorld”

9. In the termial, go to your hello app, “cd hello”

10. In the termial, specify your build target, type “cordova platform add ios” (target is ios here, others like android, firefox, kindle fire, blackberry etc..)

11. In the termial, ready to build the project, type “cordova build”

12. Use Xcode IDE and ready to develop, so double clicking “hello/platforms/ios/HelloWorld.xcodeproj” (or a file ending with .xcodeproj)

13. There is a “Play” symbol/button on the Xcode IDE, you can click it and Xcode will launch the iOS simulator running your ionic Hello app.

14. And the rest is iterating your code and build. That is, modifying your project in Xcode, building your project in a terminal with “cordova build”, then click the “Play” button to test

No comments: