Original address: http://www.cnblogs.com/yansi/archive/2013/05/14/3078222.html
?
In the increasingly intense mobile development situation, I have to bite the bullet to try out the fresh HTML5 app (for me this kind of chicken is still very fresh). A very important problem is to configure Phonegap,phonegap introduction online A search a lot of, younger brother will not repeat, now the latest PHONEGAP version is 2.7,
Need to install iOS version with the command line, for I can't afford to buy a Mac, only with a black Apple chicken, I fainted for a good while
Well, now I'm not talking nonsense, step by step to everyone
The first step, download Xcode, download PhoneGap (the former directly to the app inside find also can, very convenient)
Download xcode:https://developer.apple.com/xcode/
Download phonegap:http://phonegap.com/download/#
Download Xcode after installation, phonegap not urgent, let's take a slow start
Step two: Find the downloaded phonegap zip file, unzip it, and then find it? ISO? Folder
Note: The location of iOS folders between different versions may be a little different, but it doesn't matter, just find this folder (for version 2.7)
Step three: Open? ios->bin->create file (file name may be somewhat different, but can be found with create, the following is used to refer to the file as create)
Fourth step: Execute the Create file and copy the file address
?
Fifth step: Create a folder on the desktop Xiaosi1 (where to create the folder and create the folder name is OK, but note that if you create a different folder location, then the command executed below also corresponds to the parameters)
Sixth step: Open the terminal:
?
Seventh step: Execute Terminal command:
First step:
Paste the Create address above in the Create copy into the terminal
Second step: Add the file address, package name, and project name you want to create after this section of code, then enter to execute
? Ps: Because the folder we created above is on the desktop, so the address is ~/desktop/xiaosi1 if we create XIAOSI1
in the Finder Document, the address is ~/documents/xiasoi1, and the same analogy is created elsewhere.
Now our file is created, let's open Xcode to see ~ ~ (The red circle out of the section is where we can normally write the page position)
Simulator: (opens index page by default)
?
OK, we gaocheng, but as a chicken, I mean that Xcode can edit html,css,js, but not very convenient .... Interested students can try other editors, anyway loaded up will indicate that you can run normally in the app, do not need to use Xcode editing OH (PS: The most recent front end editor is the Edge Code CC mac and win version have, and interface functions are similar, can be like sublime Text like all kinds of plug-ins, and is free, you can try OH)