10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Build numberの値を自動で更新する

10
Last updated at Posted at 2013-01-22

iOSアプリのBuild numberをビルドするたびに自動で更新スクリプトについてです。
以下のスクリプトをXcodeのBuild PhasesのRun Scriptに登録します。Xcode 4.5.2で動作を確認しています。

# !/bin/bash
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"

登録の際に注意しないといけないのは、**XcodeのSummaryにあるBuildの値を整数にしておくことです。**少数を含む値を入力しているとビルドできません。

こちらのサイトを参考にしました。
http://www.awaresoft.jp/ios-dev/item/113-xcode-increment-build-num.html

10
10
2

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
10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?