關於XCode 的agvtool命令列

來源:互聯網
上載者:User

標籤:

簡介:用agvtool如何來自動更新版本號碼和bulid version agvtool是一個命令列工具,允許你自動遞增到下一個最高的數量或具體的數字這些數字。本文檔提供了更新您的構建和版本號碼使用agvtool一步一步的指示。“Xcode”和“命令列”部分顯示是在Xcode中分別執行的步驟和命令列。 Important: When your app includes multiple targets, agvtool will set the version numbers of all your targets to the same number. 

Xcode:

你必須完成你的在Xcode項目中的設定步驟。

導航到您的目標的產生設定窗格,然後為您的組建組態進行更新,如下所示:

1.修改Xcode的預設設定

預設情況下,在不使用任何版本控制系統。設定版本系統蘋果通用確保Xcode將包括在你的項目中產生的所有agvtool版本資訊。

圖1:設定當前項目的版本和版本控制系統的構建設定

 2.設定你的版本號碼和bulid版本號碼 Set up your version and build numbers.

   這個需要你手動添加幾個項,來圖看看

agvtool查詢應用程式的Info.plist得到你的版本和bulid版本號碼。它更新他們,如果他們存在,不做任何事,

否則。確保 CFBundleVersion (Bundle version)和CFBundleShortVersionString (Bundle versions string, short)的key在你的Info.plist中

2所示。 info.plist顯示

 

3.接下來是命令列操作,來更新版本號碼

退出Xcode,然後導航到包含項目的目錄,運行下列命令在終端應用agvtool屬性工作。

   3.1 開啟終端 ,cd 工程直接路徑 例如工程名為xxx 則cd   /Users/itdept/Desktop/practice/xxx   3.2 更新版本號碼 到2.0 則輸入命令:$xcrun agvtool new-marketing-version 2.0 4.更新Build Number  4.1 自動增加你的Build Number 執行的命令:$xcrun agvtool next-version -all  4.2 給你的應用程式設定一個Build number,執行的命令是 $xcrun agvtool new-version -all 2.6.95.查看Version Numbers  5.1查看當前的Version Number 執行:$xcrun agvtool what-marketing-version  5.2 查看當前的Build Number 執行:$xcrun agvtool what-version

關於XCode 的agvtool命令列

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.