3
3

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 3 years have passed since last update.

Xcode11でのsetting.bundleのバージョン更新スクリプト

Last updated at Posted at 2020-05-27

Xcode11からVersionとBuildは、MarketingVersionと、CurrentProjectVersionで管理されるようになりました。
これにより、Settings.bundleのバージョン更新スクリプト変更しないと悲しい状態になるので対応したメモ。

APP_VERSION="$MARKETING_VERSION"
/usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:1:DefaultValue ${APP_VERSION}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Settings.bundle/Root.plist"

BUILD_NUMBER="$CURRENT_PROJECT_VERSION"
/usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:2:DefaultValue ${BUILD_NUMBER}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Settings.bundle/Root.plist"
3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?