IDEMSInternational / open-app-builder

PLH App Frontend
GNU General Public License v3.0
5 stars 24 forks source link

[FEATURE] Expand `version` script to include iOS files #2238

Closed jfmcquade closed 3 months ago

jfmcquade commented 3 months ago

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 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.

jfmcquade commented 3 months ago

Should possibly included in resolving #2239, if we are planning to rethink the build files somewhat