cordova ios

使用Cordova进行iOS开发 (环境配置及基本用法)

字数1426 阅读3044 评论0 

安装Cordova CLI

1. cordova的安装:
  • 1.1 安装cordova需要先安装node.js
  • 1.2 如果你没有安装git client,需要下载并安装一个git客户端,只是对项目文件进行管理的。
  • 1.3 使用node.js的依赖包管理工具npm来进行cordova安装。
    打开终端输入如下命令:
    sudo npm install -g cordova

Installing the Requirements

Xcode

There are two ways to download Xcode:

  • from the App Store, available by searching for "Xcode" in the App Store application.

  • from Apple Developer Downloads, which requires registration as an Apple Developer.

Once Xcode is installed, several command-line tools need to be enabled for Cordova to run. From the command line, run:

$ xcode-select --install

Deployment Tools

The ios-sim and ios-deploy tools - allows you to launch iOS apps into the iOS Simulator and iOS Device from the command-line.

To install them, run the following from command-line terminal:

$ npm install -g ios-sim
$ npm install -g ios-deploy --unsafe-perm=true   --allow-root    (需要加上后面这两个参数才能够正常安装 )



到此 ios 的cordova 环境搭建完成。
 
原文地址:https://www.cnblogs.com/Purk/p/5664917.html