最近一直在学习 ,phonegap,网上资料太少了,实在没有办法就只能研究E文,真实苦逼的。。。。
ios下面如何安装配置cordova 2.1以上的呢?
之前低版本的都有pkg的安装包,直接安装就可以应用了,但是cordova 2.1之后就没有安装包了,改怎么办?
搜索了好久,没有教程,只好自己看官方文档。
其实只要按照他的方法,一步一步来做还是可以实现的。
Install the iOS SDK and Apache Cordova
- Install Xcode from the Mac App Store or Apple Developer Downloads
- Install the Xcode Command Line Tools (Xcode Preferences -> Downloads -> Components -> Command Line Tools -> Install).
- Download the latest release of Apache Cordova
- extract its contents
- Apache Cordova iOS is found under
lib/ios
===============
1.安装好xcode
2.更新一个xcode的插件,直接在线安装就行了Command Line Tools。
3.下载Cordova包
Install CordovaLib
- Download the Cordova source
- Extract to source to their final permanent location on your hard drive (for example, to ~/Documents/CordovaLib-2.X.X)
- There is no step 3
=================
1.解压文件包
2.Cordova文件拷贝到文档其他目录下面
Create a New Project
- Launch Terminal.app
- Drag the bin folder (located in the permanent folder location of Cordova, from the "Install CordovaLib" section above) to the Terminal.app icon in your Dock, it should launch a new Terminal window
-
Type in
./create <project_folder_path> <package_name> <project_name>
then press "Enter"
1.打开 终端 客户端
2.把Cordova文件中ios中的bin文件夹拖入到 终端客户端,会弹出一个新的客户端,然后在里面输入命令:
./create <project_folder_path> <package_name> <project_name>
3.回车后,你刚才输入的项目文件夹里面就创建了一个demo项目,
4.最后可以通过对该项目进行修改配置,运行。
-
<project_folder_path> is the path to your new Cordova iOS project (it must be empty if it exists)
<package_name> is the package name, following reverse-domain style convention
<project_name> is the project name -
Locate your new project folder that you just created
- Launch the .xcodeproj file in the folder
================
1.打开项目文件夹,打开.xcodeproj 文件,xcode就会启动可以进行相应操作
转载请注明:夜阑小雨 » ios 6下如何安装cordova 2.1