• (转)命令行下,用 xcodebuild 生成ipa文件,通过 itms-services 协议安装


    准备工作:已经设置好,xcode中的证书,证书必须是企业级证书,才能通过 itms-services 协议安装

    Step 1:  把以下代码保存到一个web目录中,命名为 “auto.plist”,注意文件中的ipa路径和 “bundle-identifier”

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
      <key>items</key>
      <array>
        <dict>
          <key>assets</key>
          <array>
            <dict>
              <key>kind</key>
              <string>software-package</string>
              <key>url</key>
              <string>http://127.0.0.1/auto.ipa</string>
            </dict>
          </array>
          <key>metadata</key>
          <dict>
            <key>bundle-identifier</key>
            <string>com.ux.owen.auto</string>
            <key>kind</key>
            <string>software</string>
            <key>subtitle</key>
            <string>v1</string>
            <key>title</key>
            <string>Install auto</string>
          </dict>
        </dict>
      </array>
    </dict>
    </plist>

    Step 2: 进入app目录,并运行一下命令,注意修改绝对地址路径。

    #xcodebuild -project auto.xcodeproj -configuration Release -sdk iphoneos6.0 clean build
    #xcrun -sdk iphoneos PackageApplication 
      "/Users/owen/Documents/xcode/POC/auto/build/Release-iphoneos/auto.app" 
      -o "/Users/owen/Documents/xcode/POC/auto/build/Release-iphoneos/auto.ipa"
    #cp /Users/owen/Documents/xcode/POC/auto/build/Release-iphoneos/auto.ipa /Users/owen/web/localhost/auto.ipa

    Step 3: 在IOS设备上,通过Safari访问以下链接地址,进行安装

    itms-services://?action=download-manifest&url=http://127.0.0.1/auto.plist

    附:
    phonegap应用,可以build成功,但无法通过此办法可以安装,该死的phonegap花费我无数个小时,仍无法解决这个问题,强烈鄙视。

  • 相关阅读:
    HTML
    HTML
    HTML
    HTML
    HTML
    HTML
    HTML
    TOMCAT-IDEA远程debug方法
    调整mysql数据库最大连接数
    win10开机时内存使用率达到99%以上
  • 原文地址:https://www.cnblogs.com/greywolf/p/3459445.html
Copyright © 2020-2023  润新知