xcode安装app

    1. 安装 xcode
    2. 安装 xcode command line tool
      1. 检查是否安装 在终端中运行: xcrun simctl list
        1. 如果出现所有的 Device Types,则可以进行第3步
        2. 如果出现error: 

          xcrun: error: unable to find utility "simctl", not a developer tool or in PATH

        3. 安装xcode

          终端运行: xcode-select --install

        4. 或者是安装成功继续第3步,否则继续

        5. 如果出现报错说command已经存在

          xcode-select: error: command line tools are already installed

        6. 在终端中输入:

          DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer/"

          export DEVELOPER_DIR

        7. 继续执行 i步骤,如果出现 Device Types则第3步,如果还是无效则google查询问题
    3. 启动simulator
    4. 安装app
      1. 终端运行: xcrun simctl install booted <path to app>
        1. booted表示当前启动的simulator,可以替换为xcrun simctl list里面的device UDID
        2. 运行后没有信息输出表示安装成功
原文地址:https://www.cnblogs.com/xiaohui108/p/6136572.html