| tags:littlist update categories:iApp

littlist 2.6.3

いつのバージョンからだか不明(というか調べるつもり無し)である設定での各国語のローカライズが無視されていた不注意を直してこっそりアップしました。ついでにアプリの名前も小文字に変更。

ついでに、ネット各所に載って いますが、バージョンとビルドの番号を設定に半自動に書き込むコピペスクリプトをTargetのBuild Phases追加する。 ビルドのカウントはされるが、アプリ更新時の設定への書出しは自分でInfo.plistに書き込む必要がある形にしています。

agvtool bump
# agvtool bump -all #Info.plistも更新したいとき

infoPlistFileSource="${SRCROOT}/${INFOPLIST_FILE}"
#infoPlistFileDestination="${TEMP_DIR}/Preprocessed-Info.plist"
rootPlistFileDestination="${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Settings.bundle/Root.plist"

if [ ${CONFIGURATION} = "Debug" ]; then
    # Version 2.6.3
    # Build @ 2014-01-16 12:16 (dev.298)
    versionPrefix=" (dev."
    date=$(date "+@ %Y-%m-%d %H:%M")
    APP_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" $infoPlistFileSource)
    BUILD_NUMBER=$date$versionPrefix${CURRENT_PROJECT_VERSION}")"
else
    # Version 2.6.3 @ 2014.01.16
    # Build  276
    date=$(date "+ @ %Y.%m.%d")
    APP_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" $infoPlistFileSource)$date
    BUILD_NUMBER=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $infoPlistFileSource)
fi

# ここのPreferenceSpecifiers:16, 17は各アプリによって変更
/usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:16:DefaultValue $APP_VERSION" $rootPlistFileDestination
/usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:17:DefaultValue $BUILD_NUMBER" $rootPlistFileDestination

検証機で開発中には、こんな感じで、いつビルドしたかを把握でるようにして、アプストアーにあげる際には、ビルド番号はあまり利用者には関係ないので、シンプルに。逆にバージョンはいくつで何時作られたかが分かるようにビルドした日付を追加してます。

Dev App

以下を Setting.bundle/Root.plistに加える事もお忘れなく。

        <dict>
            <key>Title</key>
            <string>About</string>
            <key>Type</key>
            <string>PSGroupSpecifier</string>
            <key>FooterText</key>
            <string>Copyright © 2015 XXXX All Rights Reserved.</string>
        </dict>
        <dict>
            <key>Type</key>
            <string>PSTitleValueSpecifier</string>
            <key>DefaultValue</key>
            <string>1.0</string>
            <key>Title</key>
            <string>Version</string>
            <key>Key</key>
            <string>app_version_number</string>
        </dict>
        <dict>
            <key>Type</key>
            <string>PSTitleValueSpecifier</string>
            <key>DefaultValue</key>
            <string>1</string>
            <key>Title</key>
            <string>Build</string>
            <key>Key</key>
            <string>app_build_number</string>
        </dict>

追記:
少しカッコつけてビルドした場所を書き加えました。これで少し作業のモチベーションが上がるかもしれん。。

Release

See Also

🏝 tipping

🌷 sat ⚡️ goozenlab@getalby.com
🌻 bitcoin : bc1qnjhnsxgqah050995dkdveav4y3t3d7uxyme4ud

If you do send a tip, Please email me so that I can say thank you.