Browse Source

[iOS] show app and bundle version in system settings

Andrey Filipenkov 3 years ago
parent
commit
7801a2ad85

+ 20 - 0
client/ios/Settings.bundle/Root.plist

@@ -6,6 +6,26 @@
 	<string>Root</string>
 	<key>PreferenceSpecifiers</key>
 	<array>
+		<dict>
+			<key>Type</key>
+			<string>PSTitleValueSpecifier</string>
+			<key>Title</key>
+			<string>AppVersion</string>
+			<key>Key</key>
+			<string>foo1</string>
+			<key>DefaultValue</key>
+			<string></string>
+		</dict>
+		<dict>
+			<key>Type</key>
+			<string>PSTitleValueSpecifier</string>
+			<key>Title</key>
+			<string>BuildVersion</string>
+			<key>Key</key>
+			<string>foo2</string>
+			<key>DefaultValue</key>
+			<string></string>
+		</dict>
 		<dict>
 			<key>Type</key>
 			<string>PSRadioGroupSpecifier</string>

+ 3 - 0
client/ios/Settings.bundle/en.lproj/Root.strings

@@ -1,3 +1,6 @@
 "LaunchType" = "App start type";
 "Launcher" = "Launcher";
 "Game" = "Game";
+
+"AppVersion" = "Application version";
+"BuildVersion" = "Build version";

+ 3 - 0
client/ios/Settings.bundle/ru.lproj/Root.strings

@@ -1,3 +1,6 @@
 "LaunchType" = "Тип запуска приложения";
 "Launcher" = "Конфигурация (лаунчер)";
 "Game" = "Игра";
+
+"AppVersion" = "Версия приложения";
+"BuildVersion" = "Версия сборки";

+ 3 - 0
ios/set_build_version.sh

@@ -5,3 +5,6 @@ commitShort=$(git rev-parse --short HEAD)
 bundleVersion="$today-$commitShort"
 
 /usr/libexec/PlistBuddy "$1/Info.plist" -c "Set :CFBundleVersion $bundleVersion"
+
+/usr/libexec/PlistBuddy "$1/Settings.bundle/Root.plist" -c "Set :PreferenceSpecifiers:0:DefaultValue $MARKETING_VERSION"
+/usr/libexec/PlistBuddy "$1/Settings.bundle/Root.plist" -c "Set :PreferenceSpecifiers:1:DefaultValue $bundleVersion"