LoginSignup
5
4

More than 5 years have passed since last update.

[Xcode] agvtoolでバージョン管理

Posted at

agvtoolとは

Apple Generic Versioning Toolの略。バージョン・ビルド番号設定やインクリメントをしてくれるもの。fastlaneなどで管理している場合はあまり使う場面はないかもしれないが、target毎にいちいち設定するのが面倒な場合におすすめ

設定方法

PROJECT > Build Setting > Versioning > Versioning System で Apple Generic を選択

更新方法

プロジェクトルートで以下のコマンド実行してバージョン、ビルド番号の更新をする

バージョン番号

agvtool new-marketing-version <versString>

ビルド番号

agvtool new-version -all <versString>

その他のコマンド

// Current Project Versionの更新
agvtool new-version <versString>

// ビルド番号のインクリメント
agvtool next-version -all

// Current Project Versionの確認
agvtool what-version

// 各Info.plistのバージョン確認
agvtool what-marketing-version

Info.plistが見つからないというエラー

Cannot find "....Info.plist"と言われたらパスが間違ってる可能性があるので
TARGETS > Packaging > Info.plist File でパス設定をする

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4