Compare commits
3 commits
1b98fab868
...
9ca0bbc35c
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ca0bbc35c | |||
| ce1ad286cb | |||
| e1d87bb261 |
8 changed files with 174 additions and 70 deletions
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.16.2](https://github.com/alerte-secours/as-app/compare/v1.16.1...v1.16.2) (2026-01-12)
|
||||||
|
|
||||||
## [1.16.1](https://github.com/alerte-secours/as-app/compare/v1.15.0...v1.16.1) (2026-01-12)
|
## [1.16.1](https://github.com/alerte-secours/as-app/compare/v1.15.0...v1.16.1) (2026-01-12)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
24
DEVELOPER.md
24
DEVELOPER.md
|
|
@ -137,15 +137,25 @@ If you need to install the app manually, you can examine the `install-android.sh
|
||||||
|
|
||||||
#### Building and Running
|
#### Building and Running
|
||||||
|
|
||||||
To build and run the iOS app:
|
To build and run the iOS app:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Run in development mode with staging environment
|
# Run in development mode with staging environment
|
||||||
yarn ios:staging
|
yarn ios:staging
|
||||||
|
|
||||||
# Build for production (uses scripts/ios-archive.sh and scripts/ios-export.sh)
|
# Build for production (version + clean + archive + export)
|
||||||
yarn bundle:ios
|
yarn bundle:ios:build
|
||||||
```
|
|
||||||
|
# Upload the last build to App Store Connect
|
||||||
|
yarn bundle:ios:upload
|
||||||
|
|
||||||
|
# Build + upload
|
||||||
|
yarn bundle:ios:release
|
||||||
|
```
|
||||||
|
|
||||||
|
Notes on versioning:
|
||||||
|
- `yarn bundle:ios:build` updates iOS `CFBundleShortVersionString` and `CFBundleVersion` to a timestamp in `Europe/Paris` timezone (format `YYYYMMDDHHMM`) before archiving/exporting.
|
||||||
|
- `yarn bundle:ios` is an alias of `yarn bundle:ios:build`.
|
||||||
|
|
||||||
The `bundle:ios` command uses the scripts in the `scripts` directory:
|
The `bundle:ios` command uses the scripts in the `scripts` directory:
|
||||||
- `ios-archive.sh` - Archives the iOS app
|
- `ios-archive.sh` - Archives the iOS app
|
||||||
|
|
|
||||||
|
|
@ -197,9 +197,11 @@
|
||||||
9E6F0A1338934BA5AD468D4B /* Fix Xcode 15 Bug */,
|
9E6F0A1338934BA5AD468D4B /* Fix Xcode 15 Bug */,
|
||||||
229987488EA44E69AA932D58 /* Fix Xcode 15 Bug */,
|
229987488EA44E69AA932D58 /* Fix Xcode 15 Bug */,
|
||||||
A891237ADBD54747890A99FB /* Fix Xcode 15 Bug */,
|
A891237ADBD54747890A99FB /* Fix Xcode 15 Bug */,
|
||||||
B700EE07E2A24654A0953D3B /* Remove signature files (Xcode workaround) */,
|
|
||||||
9E272D599E42446BB8DFD8D0 /* Fix Xcode 15 Bug */,
|
9E272D599E42446BB8DFD8D0 /* Fix Xcode 15 Bug */,
|
||||||
CBAD4F53ADB04F499371D5DE /* Remove signature files (Xcode workaround) */,
|
884372829D0E4436B7BC6F91 /* Fix Xcode 15 Bug */,
|
||||||
|
F778935A7C8642C4851AE054 /* Remove signature files (Xcode workaround) */,
|
||||||
|
A1D9EF7E0B4442DF8860F6A5 /* Fix Xcode 15 Bug */,
|
||||||
|
B6A277D5FA3848ECACDAF93C /* Remove signature files (Xcode workaround) */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
|
|
@ -1066,6 +1068,74 @@ fi";
|
||||||
shellScript = "
|
shellScript = "
|
||||||
echo \"Remove signature files (Xcode workaround)\";
|
echo \"Remove signature files (Xcode workaround)\";
|
||||||
rm -rf \"$CONFIGURATION_BUILD_DIR/MapLibre.xcframework-ios.signature\";
|
rm -rf \"$CONFIGURATION_BUILD_DIR/MapLibre.xcframework-ios.signature\";
|
||||||
|
";
|
||||||
|
};
|
||||||
|
884372829D0E4436B7BC6F91 /* Fix Xcode 15 Bug */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
name = "Fix Xcode 15 Bug";
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "if [ \"$XCODE_VERSION_MAJOR\" = \"1500\" ]; then
|
||||||
|
echo \"Remove signature files (Xcode 15 workaround)\"
|
||||||
|
find \"$BUILD_DIR/${CONFIGURATION}-iphoneos\" -name \"*.signature\" -type f | xargs -r rm
|
||||||
|
fi";
|
||||||
|
};
|
||||||
|
F778935A7C8642C4851AE054 /* Remove signature files (Xcode workaround) */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
name = "Remove signature files (Xcode workaround)";
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "
|
||||||
|
echo \"Remove signature files (Xcode workaround)\";
|
||||||
|
rm -rf \"$CONFIGURATION_BUILD_DIR/MapLibre.xcframework-ios.signature\";
|
||||||
|
";
|
||||||
|
};
|
||||||
|
A1D9EF7E0B4442DF8860F6A5 /* Fix Xcode 15 Bug */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
name = "Fix Xcode 15 Bug";
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "if [ \"$XCODE_VERSION_MAJOR\" = \"1500\" ]; then
|
||||||
|
echo \"Remove signature files (Xcode 15 workaround)\"
|
||||||
|
find \"$BUILD_DIR/${CONFIGURATION}-iphoneos\" -name \"*.signature\" -type f | xargs -r rm
|
||||||
|
fi";
|
||||||
|
};
|
||||||
|
B6A277D5FA3848ECACDAF93C /* Remove signature files (Xcode workaround) */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
name = "Remove signature files (Xcode workaround)";
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "
|
||||||
|
echo \"Remove signature files (Xcode workaround)\";
|
||||||
|
rm -rf \"$CONFIGURATION_BUILD_DIR/MapLibre.xcframework-ios.signature\";
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
|
||||||
|
|
@ -25,30 +25,30 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.16.0</string>
|
<string>202601121722</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>CFBundleURLName</key>
|
||||||
|
<string>com.alertesecours.alertesecours</string>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>com.alertesecours.alertesecours</string>
|
<string>com.alertesecours.alertesecours</string>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleURLName</key>
|
|
||||||
<string>com.alertesecours.alertesecours</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>CFBundleURLName</key>
|
||||||
|
<string>com.alertesecours.alertesecours.expo</string>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>exp+alerte-secours</string>
|
<string>exp+alerte-secours</string>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleURLName</key>
|
|
||||||
<string>com.alertesecours.alertesecours.expo</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>231</string>
|
<string>202601121722</string>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>LSApplicationQueriesSchemes</key>
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
|
|
|
||||||
14
package.json
14
package.json
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "alerte-secours",
|
"name": "alerte-secours",
|
||||||
"version": "1.16.1",
|
"version": "1.16.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "expo start --dev-client --private-key-path ./keys/private-key.pem",
|
"start": "expo start --dev-client --private-key-path ./keys/private-key.pem",
|
||||||
|
|
@ -15,10 +15,10 @@
|
||||||
"bundle:ios:archive": "./scripts/ios-archive.sh",
|
"bundle:ios:archive": "./scripts/ios-archive.sh",
|
||||||
"bundle:ios:export": "./scripts/ios-export.sh",
|
"bundle:ios:export": "./scripts/ios-export.sh",
|
||||||
"bundle:ios:upload": "./scripts/ios-upload.sh",
|
"bundle:ios:upload": "./scripts/ios-upload.sh",
|
||||||
"bundle:ios": "yarn bundle:ios:archive && yarn bundle:ios:export",
|
"bundle:ios:version": "bash ./scripts/ios-set-timestamp-build-number.sh | tail -n 1 | xargs -I{} echo 'iOS version timestamp: {}'",
|
||||||
"bundle:ios:testflight:version": "bash ./scripts/ios-set-testflight-build-number.sh",
|
"bundle:ios:build": "yarn bundle:ios:version && yarn bundle:ios:archive && yarn bundle:ios:export",
|
||||||
"bundle:ios:testflight:archive": "yarn bundle:ios:testflight:version && yarn bundle:ios:archive",
|
"bundle:ios:release": "yarn bundle:ios:build && yarn bundle:ios:upload",
|
||||||
"bundle:ios:testflight": "yarn bundle:ios:testflight:archive && yarn bundle:ios:export && yarn bundle:ios:upload",
|
"bundle:ios": "yarn bundle:ios:build",
|
||||||
"ios": "expo run:ios",
|
"ios": "expo run:ios",
|
||||||
"ios:staging": "dotenv --override -e .env.staging -- yarn run ios",
|
"ios:staging": "dotenv --override -e .env.staging -- yarn run ios",
|
||||||
"ios:prod": "dotenv --override -e .env.prod -- yarn run ios",
|
"ios:prod": "dotenv --override -e .env.prod -- yarn run ios",
|
||||||
|
|
@ -53,8 +53,8 @@
|
||||||
"screenshot:android": "scripts/screenshot-android.sh"
|
"screenshot:android": "scripts/screenshot-android.sh"
|
||||||
},
|
},
|
||||||
"customExpoVersioning": {
|
"customExpoVersioning": {
|
||||||
"versionCode": 232,
|
"versionCode": 233,
|
||||||
"buildNumber": 232
|
"buildNumber": 233
|
||||||
},
|
},
|
||||||
"commit-and-tag-version": {
|
"commit-and-tag-version": {
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
|
|
@ -2,40 +2,9 @@
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
PROJECT_ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
# Backward compatible wrapper.
|
||||||
INFO_PLIST_PATH="$PROJECT_ROOT_DIR/ios/AlerteSecours/Info.plist"
|
# Historically this script was TestFlight-specific, but iOS builds now use the same
|
||||||
|
# timestamp versioning for all distribution bundles.
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
if [ ! -f "$INFO_PLIST_PATH" ]; then
|
exec "$SCRIPT_DIR/ios-set-timestamp-build-number.sh"
|
||||||
echo "error: Info.plist not found at $INFO_PLIST_PATH" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Generate a unique version/build number for TestFlight in Europe/Paris timezone
|
|
||||||
# This value will be used for both CFBundleShortVersionString and CFBundleVersion.
|
|
||||||
# Format: YYYYMMDDHHMM, e.g. 202601121110 (valid as a numeric-only iOS version).
|
|
||||||
BUILD_NUMBER="$(TZ=Europe/Paris date +%Y%m%d%H%M)"
|
|
||||||
|
|
||||||
echo "[ios-set-testflight-build-number] Using build number: $BUILD_NUMBER"
|
|
||||||
|
|
||||||
PLISTBUDDY="/usr/libexec/PlistBuddy"
|
|
||||||
|
|
||||||
if [ ! -x "$PLISTBUDDY" ]; then
|
|
||||||
echo "error: $PLISTBUDDY not found or not executable. This script must run on macOS with PlistBuddy available." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
set_plist_version_key() {
|
|
||||||
local key="$1"
|
|
||||||
# Try to set the existing key, or add it if it does not exist yet.
|
|
||||||
if ! "$PLISTBUDDY" -c "Set :$key $BUILD_NUMBER" "$INFO_PLIST_PATH" 2>/dev/null; then
|
|
||||||
"$PLISTBUDDY" -c "Add :$key string $BUILD_NUMBER" "$INFO_PLIST_PATH"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
set_plist_version_key "CFBundleVersion"
|
|
||||||
set_plist_version_key "CFBundleShortVersionString"
|
|
||||||
|
|
||||||
echo "[ios-set-testflight-build-number] Updated CFBundleShortVersionString and CFBundleVersion in $INFO_PLIST_PATH to $BUILD_NUMBER"
|
|
||||||
|
|
||||||
# Print the build number on stdout so callers can capture/log it easily.
|
|
||||||
echo "$BUILD_NUMBER"
|
|
||||||
|
|
|
||||||
42
scripts/ios-set-timestamp-build-number.sh
Normal file
42
scripts/ios-set-timestamp-build-number.sh
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
PROJECT_ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
INFO_PLIST_PATH="$PROJECT_ROOT_DIR/ios/AlerteSecours/Info.plist"
|
||||||
|
|
||||||
|
if [ ! -f "$INFO_PLIST_PATH" ]; then
|
||||||
|
echo "error: Info.plist not found at $INFO_PLIST_PATH" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Generate a unique timestamp version/build number in Europe/Paris timezone
|
||||||
|
# This value will be used for both CFBundleShortVersionString and CFBundleVersion.
|
||||||
|
# Format: YYYYMMDDHHMM, e.g. 202601121110 (valid as a numeric-only iOS version).
|
||||||
|
BUILD_NUMBER="$(TZ=Europe/Paris date +%Y%m%d%H%M)"
|
||||||
|
|
||||||
|
echo "[ios-set-timestamp-build-number] Using build number: $BUILD_NUMBER"
|
||||||
|
|
||||||
|
PLISTBUDDY="/usr/libexec/PlistBuddy"
|
||||||
|
|
||||||
|
if [ ! -x "$PLISTBUDDY" ]; then
|
||||||
|
echo "error: $PLISTBUDDY not found or not executable. This script must run on macOS with PlistBuddy available." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
set_plist_version_key() {
|
||||||
|
local key="$1"
|
||||||
|
# Try to set the existing key, or add it if it does not exist yet.
|
||||||
|
if ! "$PLISTBUDDY" -c "Set :$key $BUILD_NUMBER" "$INFO_PLIST_PATH" 2>/dev/null; then
|
||||||
|
"$PLISTBUDDY" -c "Add :$key string $BUILD_NUMBER" "$INFO_PLIST_PATH"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
set_plist_version_key "CFBundleVersion"
|
||||||
|
set_plist_version_key "CFBundleShortVersionString"
|
||||||
|
|
||||||
|
echo "[ios-set-timestamp-build-number] Updated CFBundleShortVersionString and CFBundleVersion in $INFO_PLIST_PATH to $BUILD_NUMBER"
|
||||||
|
|
||||||
|
# Print the build number on stdout so callers can capture/log it easily.
|
||||||
|
echo "$BUILD_NUMBER"
|
||||||
|
|
||||||
|
|
@ -52,19 +52,30 @@ fi
|
||||||
IPA_PLIST_TMP=$(mktemp -t as_ipa_Info.plist)
|
IPA_PLIST_TMP=$(mktemp -t as_ipa_Info.plist)
|
||||||
unzip -p "$IPA_PATH" "Payload/AlerteSecours.app/Info.plist" > "$IPA_PLIST_TMP" 2>/dev/null || true
|
unzip -p "$IPA_PATH" "Payload/AlerteSecours.app/Info.plist" > "$IPA_PLIST_TMP" 2>/dev/null || true
|
||||||
|
|
||||||
if [ -s "$IPA_PLIST_TMP" ]; then
|
if [ -s "$IPA_PLIST_TMP" ]; then
|
||||||
IPA_PKG_VERSION=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "$IPA_PLIST_TMP" 2>/dev/null || echo "")
|
IPA_PKG_VERSION=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "$IPA_PLIST_TMP" 2>/dev/null || echo "")
|
||||||
IPA_BUILD_NUMBER=$(/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" "$IPA_PLIST_TMP" 2>/dev/null || echo "")
|
IPA_BUILD_NUMBER=$(/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" "$IPA_PLIST_TMP" 2>/dev/null || echo "")
|
||||||
echo " IPA Info.plist (from payload): ${IPA_PKG_VERSION:-unknown} (${IPA_BUILD_NUMBER:-unknown})"
|
echo " IPA Info.plist (from payload): ${IPA_PKG_VERSION:-unknown} (${IPA_BUILD_NUMBER:-unknown})"
|
||||||
if [ -n "$IPA_PKG_VERSION" ] && [ -n "$IPA_BUILD_NUMBER" ]; then
|
if [ -n "$IPA_PKG_VERSION" ] && [ -n "$IPA_BUILD_NUMBER" ]; then
|
||||||
if [ "$SRC_PKG_VERSION" != "$IPA_PKG_VERSION" ] || [ "$SRC_BUILD_NUMBER" != "$IPA_BUILD_NUMBER" ]; then
|
# Enforce that CFBundleShortVersionString matches exactly between source and IPA.
|
||||||
echo "Error: IPA version mismatch with source Info.plist."
|
if [ "$SRC_PKG_VERSION" != "$IPA_PKG_VERSION" ]; then
|
||||||
|
echo "Error: IPA CFBundleShortVersionString mismatch with source Info.plist."
|
||||||
|
echo "Hint: Run 'yarn bundle:ios' to export a fresh IPA aligned with current versions."
|
||||||
|
rm -f "$IPA_PLIST_TMP"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Allow IPA CFBundleVersion to be greater than or equal to the source
|
||||||
|
# (Xcode may auto-increment it), but reject if it is lower, which
|
||||||
|
# indicates a stale IPA.
|
||||||
|
if [ "$IPA_BUILD_NUMBER" -lt "$SRC_BUILD_NUMBER" ]; then
|
||||||
|
echo "Error: IPA CFBundleVersion ($IPA_BUILD_NUMBER) is lower than source build number ($SRC_BUILD_NUMBER)."
|
||||||
echo "Hint: Run 'yarn bundle:ios' to export a fresh IPA aligned with current versions."
|
echo "Hint: Run 'yarn bundle:ios' to export a fresh IPA aligned with current versions."
|
||||||
rm -f "$IPA_PLIST_TMP"
|
rm -f "$IPA_PLIST_TMP"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Warning: Could not read Info.plist from IPA payload for verification. Continuing."
|
echo "Warning: Could not read Info.plist from IPA payload for verification. Continuing."
|
||||||
fi
|
fi
|
||||||
rm -f "$IPA_PLIST_TMP"
|
rm -f "$IPA_PLIST_TMP"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue