The yarn run version script (see #2206) should include an optional flag, --ios, which triggers the script to perform the appropriate string replacements for the iOS files, equivalent to the Android replacements made when using the --android flag.
The values that need to be replaced are the values of the variables CURRENT_PROJECT_VERSION and MARKETING_VERSION in the file ios/App/App.xcodeproj/project.pbxproj, each of which appears twice (these variables are then used to populate the values for the keys CFBundleVersion and CFBundleShortVersionString in the file ios/App/App/Info.plist respectively). I believe that these values map on to our existing concepts of versionCode and versionName respectively (as used in the script file packages/scripts/src/commands/version.ts).
As part of implementing this script, the hardcoded values for the relevant version numbers as they exist in ios/App/App.xcodeproj/project.pbxproj could be replaced with *version_code* and *version_name*, as is the case with the android build files. This requires a dev to run the version script before they are able to successfully run the android app locally. Alternatively, the placeholder values could be valid values.
What? Follow-up to #2234.
The
yarn run version
script (see #2206) should include an optional flag,--ios
, which triggers the script to perform the appropriate string replacements for the iOS files, equivalent to the Android replacements made when using the--android
flag.The values that need to be replaced are the values of the variables CURRENT_PROJECT_VERSION and MARKETING_VERSION in the file
ios/App/App.xcodeproj/project.pbxproj
, each of which appears twice (these variables are then used to populate the values for the keysCFBundleVersion
andCFBundleShortVersionString
in the fileios/App/App/Info.plist
respectively). I believe that these values map on to our existing concepts ofversionCode
andversionName
respectively (as used in the script filepackages/scripts/src/commands/version.ts
).As part of implementing this script, the hardcoded values for the relevant version numbers as they exist in
ios/App/App.xcodeproj/project.pbxproj
could be replaced with*version_code*
and*version_name*
, as is the case with the android build files. This requires a dev to run theversion
script before they are able to successfully run the android app locally. Alternatively, the placeholder values could be valid values.