- assert_xcode_version.sh
- check_metadata_length.sh
- check_version.sh
- loc_export.sh
- loc_import.sh
- loc_update.sh
- prepare_release.sh
- set_version.sh
- update_embedded.sh
This script reads the minimum required Xcode version specified in the .xcode-version
file and compares it with the version returned by the xcodebuild -version
command. If the installed Xcode version is lower than the required version, the script prints an error message and exits with a non-zero status code. If the installed Xcode version is higher than the required version, the script prints a warning message suggesting to update the .xcode-version
file.
The script uses xcodebuild
to check the currently installed version of Xcode, so a valid installation of Xcode and xcodebuild
are required to run the script.
This script is intended to be used as a build phase in Xcode called "Assert Xcode version". The script will be automatically executed before building the project, and if the Xcode version does not meet the minimum requirement, the build will fail with an error message.
This script checks the length of metadata strings for App Store Connect before submitting an app to the App Store. It verifies that the length of the metadata strings does not exceed the allowed maximum length.
No 3rd party software is required to run the script. It uses built-in command line utilities.
To check metadata correctness:
$ ./scripts/check_metadata_length.sh
This script is used by another script prepare_release.sh
, which creates a new app release to ensure a successful submission.
This script prevents the app version number from being overridden by any external factor, such as user input or a build system. It checks whether the MARKETING_VERSION
field is present in the project.pbxproj
file of the Xcode project and exits with an error message if it is found.
No 3rd party software is required to run the script. It uses built-in command line utilities.
This script is intended to be used as a Build Phase in Xcode called "Prevent Version Override".
This script exports localizations from the project's Xcode project file into an XLIFF file for translation. It also opens the generated XLIFF file in Xcode for review.
Xcode must be installed on the system.
The loc_update.sh
script must be present in the same directory.
To export localizations:
$ ./scripts/loc_export.sh
The script will update the localizations with loc_update.sh
and then export them to an XLIFF file. After the XLIFF file has been generated, it will be opened in Xcode for review. See: https://app.asana.com/0/0/1195919669085072/f for more info.
This script imports translated localization files into the app.
No 3rd party software is required to run the script. It uses built-in command line utilities.
The script takes two arguments: the path to the directory containing localization files and the base name of the translation files.
To import localization files:
$ ./scripts/loc_import.sh /path/to/translation/files/ <name of xliff file>
See: https://app.asana.com/0/0/1195919669085073/f for more info.
This script updates localization strings for app targets by running xcrun extractLocStrings
command on each Swift file in the specified target sub-directories. It then converts the extracted strings to UTF-8 format and moves them to the en.lproj/Localizable.strings
file for each target.
No 3rd party software is required to run the script. It uses built-in command line utilities.
This script is designed to be called by the loc_export.sh
script and is intended to be used as a Build Phase in Xcode called "Update Localizable.strings". It is not intended to be used independently.
To import localization files:
$ ./scripts/loc_import.sh /path/to/translation/files/ <name of xliff file>
See: https://app.asana.com/0/0/1195919669085073/f for more info.
This script sets the marketing version of the app by modifying Version.xcconfig
and Root.plist
files. It takes one argument, which is the new marketing version of the app.
No 3rd party software is required to run the script. It uses built-in command line utilities.
To set the marketing version of the app, run:
$ ./set_version.sh <version>
This script is used by another script prepare_release.sh
, which creates a new app release with correct version number.
This script prepares a new app release by creating a new release branch, updating the app version number, updating build number, updating embedded files, updating release notes, and creating a pull request for review.
- Creates a new app release with updated embedded files and release notes.
- Allows for the creation of either a standard release or a hotfix release.
- Automatically sets the app version and build number.
- Updates embedded files (e.g. app tracker data and privacy configuration data).
- Prompts for and updates release notes.
- Creates a pull request on the default branch for review and merging.
- The script should be run from inside of the iOS project.
- The bundle and fastlane Ruby gems must be installed.
- The gh command-line tool (GitHub CLI) must be installed and authenticated.
- The
update_embedded.sh
script must be present in the same directory. - The
set_version.sh
script must be present in the same directory. - The assets directory with prepare-release-description file must be present in the same directory.
$ ./prepare_release.sh <version> [-h] [-v]
Where:
<version>
: The version number to be used for the release (e.g., 7.100.1).-h
: An optional flag that indicates that this is a hotfix release. If specified, the script creates a hotfix branch instead of a release branch.-v
: An optional flag that enables verbose mode.
This script checks app's source code for ETag values of Tracker Data Set and Privacy Config files embedded in the app, downloads new versions of the files if they appear outdated and updates relevant entries in the source code to reflect the metadata (ETag and SHA256 sum) of downloaded files.
It may update the following files:
- Core/ContentBlocker/AppPrivacyConfigurationDataProvider.swift
- Core/ContentBlocker/AppTrackerDataSetProvider.swift
- Core/ContentBlocker/ios-config.json
- Core/ContentBlocker/trackerData.json
No 3rd party software is required to run the script. It uses built-in command line utilities and curl.
To update embedded files if needed:
$ ./scripts/update_embedded.sh
Make sure that unit tests pass after updating files. These test cases verify embedded data correctness:
EmbeddedTrackerDataTests.testWhenEmbeddedDataIsUpdatedThenUpdateSHAAndEtag
AppPrivacyConfigurationTests.testWhenEmbeddedDataIsUpdatedThenUpdateSHAAndEtag
This script is used by another script prepare_release.sh
, which creates a new app release with updated embedded files.