phonegap mac 安装运行

前提首先安装了 xcode, 更新了最新版的系统, 系统不知道怎么问题, 老版本的系统 xcode提示不大行啊
1. 安装nodejs mac 版
2. 运行命令 npm install -g phonegap
3. 安装没有权限 , 需要切换到 administrator 权限

Please try running this command again as root/Administrator.

1
$ sudo chown -R $USER /usr/local
  1. 重新 运行
    1
    2
    3
    4
    npm -install -r phonegap
    phonegap create my-app
    cd my-app
    phonegap run ios
    提示错误

    [phonegap]  successfully compiled iOS app
    [phonegap]  trying to install app onto device
    Error: ios-deploy was not found. Please download, build and install version 1.0.4 or greater from  https://github.com/phonegap/ios-deploy  into your path. Or ‘npm install -g ios-deploy’ using node.js:  http://nodejs.org/
    [phonegap]  trying to install app onto emulator
    [warning]  missing ios-sim
    [warning]  install ios-sim from  http://github.com/phonegap/ios-sim
    Error: ios-sim was not found. Please download, build and install version 1.7 or greater from  https://github.com/phonegap/ios-sim into your path. Or ‘npm install -g ios-sim’ using node.js:  http://nodejs.org/
    [error]  /usr/local/bin/my-app/platforms/ios/cordova/run: Command failed with exit code 1

安装   iOS-deploy, ios-sim

1
2
npm install -g ios-deploy
npm install -g ios-sim
  1. 再次运行
    1
    phonegap run iOS
    成功

原文地址 : phonegap mac 安装运行
本站是作者语雀文档的镜像站, 如对文章有任何疑问请移步语雀进行 提问

作者

Duoli

发布于

2022-04-14

更新于

2022-08-24

许可协议

评论