Skip to content

Commit

Permalink
Add app version to settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtyHairy committed Feb 26, 2024
1 parent 3374412 commit d1a1916
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 6 deletions.
35 changes: 29 additions & 6 deletions app/CloudpilotEmu.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
CD89F885237E9D9200C436A1 /* Sources */,
CD89F886237E9D9200C436A1 /* Frameworks */,
CD89F887237E9D9200C436A1 /* Resources */,
E00E77F82B8D40240003ED0F /* Add version to settings bundle */,
);
buildRules = (
);
Expand Down Expand Up @@ -178,6 +179,28 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E00E77F82B8D40240003ED0F /* Add version to settings bundle */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/Info.plist",
"",
);
name = "Add version to settings bundle";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/Settings.bundle/Root.plist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# BUILD_VERSION=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"$TARGET_BUILD_DIR/Info.plist\")\nBUILD_VERSION=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/Info.plist\")\n/usr/libexec/PlistBuddy -c \"Set PreferenceSpecifiers:2:DefaultValue $MARKETING_VERSION\" \"${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/Settings.bundle/Root.plist\"\n/usr/libexec/PlistBuddy -c \"Set PreferenceSpecifiers:3:DefaultValue $BUILD_VERSION\" \"${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/Settings.bundle/Root.plist\"\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -344,9 +367,9 @@
CLANG_ENABLE_MODULES = NO;
CODE_SIGN_ENTITLEMENTS = CloudpilotEmu/Entitlements/Entitlements.plist;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 867NKG5SZS;
INFOPLIST_FILE = CloudpilotEmu/Info.plist;
Expand All @@ -360,7 +383,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "io.github.cloudpilot-emu";
PRODUCT_NAME = CloudpilotEmu;
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "CloudpilotEmu AdHoc 1 / pinchies";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "CloudpilotEmu Dev";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand All @@ -378,9 +401,9 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = NO;
CODE_SIGN_ENTITLEMENTS = CloudpilotEmu/Entitlements/Entitlements.plist;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 867NKG5SZS;
INFOPLIST_FILE = CloudpilotEmu/Info.plist;
Expand All @@ -394,7 +417,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "io.github.cloudpilot-emu";
PRODUCT_NAME = CloudpilotEmu;
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "CloudpilotEmu AdHoc 1 / pinchies";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "CloudpilotEmu Dev";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand Down
28 changes: 28 additions & 0 deletions app/CloudpilotEmu/Settings.bundle/Root.plist
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,34 @@
<key>DefaultValue</key>
<false/>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Version</string>
<key>Key</key>
<string></string>
</dict>
<dict>
<key>Type</key>
<string>PSTitleValueSpecifier</string>
<key>Title</key>
<string>Version</string>
<key>DefaultValue</key>
<string>0.0</string>
<key>Key</key>
<string>INFO_MARKETING_VERSION</string>
</dict>
<dict>
<key>Type</key>
<string>PSTitleValueSpecifier</string>
<key>Title</key>
<string>Build</string>
<key>DefaultValue</key>
<string>0.0</string>
<key>Key</key>
<string>INFO_BUILD_VERSION</string>
</dict>
</array>
</dict>
</plist>

0 comments on commit d1a1916

Please sign in to comment.