Compare commits

...

3 commits

9 changed files with 377 additions and 17 deletions

View file

@ -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.11.1](https://github.com/alerte-secours/as-app/compare/v1.11.0...v1.11.1) (2025-07-18)
## [1.11.0](https://github.com/alerte-secours/as-app/compare/v1.10.9...v1.11.0) (2025-07-12) ## [1.11.0](https://github.com/alerte-secours/as-app/compare/v1.10.9...v1.11.0) (2025-07-12)

View file

@ -83,8 +83,8 @@ android {
applicationId 'com.alertesecours' applicationId 'com.alertesecours'
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 190 versionCode 191
versionName "1.11.0" versionName "1.11.1"
multiDexEnabled true multiDexEnabled true
testBuildType System.getProperty('testBuildType', 'debug') testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

View file

@ -4,8 +4,6 @@
<string name="expo_splash_screen_status_bar_translucent" translatable="false">false</string> <string name="expo_splash_screen_status_bar_translucent" translatable="false">false</string>
<string name="expo_system_ui_user_interface_style" translatable="false">automatic</string> <string name="expo_system_ui_user_interface_style" translatable="false">automatic</string>
<string name="expo_runtime_version">1.0.0</string> <string name="expo_runtime_version">1.0.0</string>
<!-- Override permission message with French text -->
<string name="message_permission_required">Alerte Secours nécessite la localisation en arrière-plan pour les alertes de proximité.</string> <string name="message_permission_required">Alerte Secours nécessite la localisation en arrière-plan pour les alertes de proximité.</string>
<string name="title_permission_required">Autorisation requise</string> <string name="title_permission_required">Autorisation requise</string>
</resources> </resources>

View file

@ -131,12 +131,12 @@ let config = {
"tel", "tel",
"telprompt", "telprompt",
], ],
BGTaskSchedulerPermittedIdentifiers: [
"com.transistorsoft.fetch",
"com.transistorsoft.customtask",
],
}, },
UIBackgroundModes: ["location", "fetch", "processing"], UIBackgroundModes: ["location", "fetch", "processing"],
BGTaskSchedulerPermittedIdentifiers: [
"com.transistorsoft.fetch",
"com.transistorsoft.customtask",
],
}, },
plugins: [ plugins: [
[ [

249
install-ios.sh Executable file
View file

@ -0,0 +1,249 @@
#!/bin/bash
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Function to print colored output
print_error() {
echo -e "${RED}Error: $1${NC}" >&2
}
print_success() {
echo -e "${GREEN}$1${NC}"
}
print_warning() {
echo -e "${YELLOW}Warning: $1${NC}"
}
print_info() {
echo -e "${BLUE}$1${NC}"
}
print_plain() {
echo -e "$1"
}
# Check if Xcode command line tools are available
if ! command -v xcrun &> /dev/null; then
print_error "Xcode command line tools are not installed."
print_info "Please install them by running: xcode-select --install"
exit 1
fi
# Define IPA path
IPA_PATH="ios/build/AlerteSecours.ipa"
# Check if IPA file exists
if [ ! -f "$IPA_PATH" ]; then
print_error "IPA file not found at: $IPA_PATH"
print_info "Please build the iOS bundle first by running:"
print_info " yarn bundle:ios"
exit 1
fi
print_info "Found IPA file: $IPA_PATH"
# Function to get connected physical iOS devices
get_physical_devices() {
xcrun devicectl list devices 2>/dev/null | awk 'NR>2 && $4=="available" {print $3}' || true
}
# Function to get available simulators (booted ones)
get_booted_simulators() {
xcrun simctl list devices | grep -E "\(Booted\)" | sed -E 's/.*\(([A-F0-9-]{36})\) \(Booted\)/\1/' || true
}
# Function to get simulator name by UDID
get_simulator_name() {
local udid="$1"
xcrun simctl list devices | grep "$udid" | sed -E 's/^[[:space:]]*([^(]+).*/\1/' | xargs
}
# Function to get device name by UDID (for physical devices)
get_device_name() {
local udid="$1"
xcrun devicectl list devices 2>/dev/null | awk -v target_udid="$udid" 'NR>2 && $3==target_udid {print $1}' || echo "Unknown Device"
}
# Function to validate physical device UDID
validate_physical_device() {
local device_id="$1"
local devices=$(get_physical_devices)
if [ -z "$devices" ]; then
return 1
fi
echo "$devices" | grep -q "^$device_id$"
}
# Function to validate simulator UDID
validate_simulator() {
local simulator_id="$1"
local simulators=$(get_booted_simulators)
if [ -z "$simulators" ]; then
return 1
fi
echo "$simulators" | grep -q "^$simulator_id$"
}
# Function to install on physical device
install_on_device() {
local device_id="$1"
local device_name=$(get_device_name "$device_id")
print_info "Installing on physical device: $device_name ($device_id)"
if xcrun devicectl device install app --device "$device_id" "$IPA_PATH"; then
print_success "Installation completed successfully on $device_name!"
return 0
else
print_error "Installation failed on $device_name"
print_info "Common solutions:"
print_info " 1. Make sure the device is unlocked and trusted"
print_info " 2. Check that the provisioning profile matches the device"
print_info " 3. Verify the device has enough storage space"
print_info " 4. Try disconnecting and reconnecting the device"
return 1
fi
}
# Function to install on simulator
install_on_simulator() {
local simulator_id="$1"
local simulator_name=$(get_simulator_name "$simulator_id")
print_info "Installing on simulator: $simulator_name ($simulator_id)"
if xcrun simctl install "$simulator_id" "$IPA_PATH"; then
print_success "Installation completed successfully on $simulator_name!"
return 0
else
print_error "Installation failed on $simulator_name"
print_info "Make sure the simulator is booted and try again"
return 1
fi
}
# Main installation logic
if [ -n "$IOS_DEVICE" ]; then
# Specific physical device requested
print_info "Using specified physical device: $IOS_DEVICE"
if ! validate_physical_device "$IOS_DEVICE"; then
print_error "Physical device $IOS_DEVICE is not connected or not found."
print_info "Connected physical devices:"
physical_devices=$(get_physical_devices)
if [ -n "$physical_devices" ]; then
echo "$physical_devices" | while read -r device; do
device_name=$(get_device_name "$device")
print_info " - $device ($device_name)"
done
else
print_info " No physical devices found"
fi
exit 1
fi
install_on_device "$IOS_DEVICE"
elif [ -n "$IOS_SIMULATOR" ]; then
# Specific simulator requested
print_info "Using specified simulator: $IOS_SIMULATOR"
if ! validate_simulator "$IOS_SIMULATOR"; then
print_error "Simulator $IOS_SIMULATOR is not booted or not found."
print_info "Booted simulators:"
booted_simulators=$(get_booted_simulators)
if [ -n "$booted_simulators" ]; then
echo "$booted_simulators" | while read -r sim; do
sim_name=$(get_simulator_name "$sim")
print_info " - $sim ($sim_name)"
done
else
print_info " No booted simulators found"
print_info " Start a simulator from Xcode or run: xcrun simctl boot <simulator-udid>"
fi
exit 1
fi
install_on_simulator "$IOS_SIMULATOR"
else
# Auto-detect: prefer physical devices, fallback to simulators
print_info "Auto-detecting iOS targets..."
# Try physical devices first
physical_devices=$(get_physical_devices)
if [ -n "$physical_devices" ]; then
target_device=$(echo "$physical_devices" | head -n 1)
device_count=$(echo "$physical_devices" | wc -l | tr -d ' ')
if [ "$device_count" -gt 1 ]; then
print_warning "Multiple physical devices found. Using first device: $target_device"
print_info "Available physical devices:"
echo "$physical_devices" | while read -r device; do
device_name=$(get_device_name "$device")
if [ "$device" = "$target_device" ]; then
print_info " - $device ($device_name) [selected]"
else
print_info " - $device ($device_name)"
fi
done
print_info "To use a specific device, run: IOS_DEVICE=<device-udid> yarn install:ios"
else
device_name=$(get_device_name "$target_device")
print_info "Using physical device: $device_name ($target_device)"
fi
install_on_device "$target_device"
else
# No physical devices, try simulators
print_info "No physical devices found. Looking for booted simulators..."
booted_simulators=$(get_booted_simulators)
if [ -n "$booted_simulators" ]; then
target_simulator=$(echo "$booted_simulators" | head -n 1)
simulator_count=$(echo "$booted_simulators" | wc -l | tr -d ' ')
if [ "$simulator_count" -gt 1 ]; then
print_warning "Multiple booted simulators found. Using first simulator: $target_simulator"
print_info "Available booted simulators:"
echo "$booted_simulators" | while read -r sim; do
sim_name=$(get_simulator_name "$sim")
if [ "$sim" = "$target_simulator" ]; then
print_info " - $sim ($sim_name) [selected]"
else
print_info " - $sim ($sim_name)"
fi
done
print_info "To use a specific simulator, run: IOS_SIMULATOR=<simulator-udid> yarn install:ios"
else
simulator_name=$(get_simulator_name "$target_simulator")
print_info "Using simulator: $simulator_name ($target_simulator)"
fi
install_on_simulator "$target_simulator"
else
print_error "No iOS devices or booted simulators found."
print_info "Please either:"
print_info " 1. Connect and trust an iOS device, or"
print_info " 2. Boot a simulator from Xcode"
print_info ""
print_info "Usage examples:"
print_info " Auto-detect: yarn install:ios"
print_info " Specific device: IOS_DEVICE=<device-udid> yarn install:ios"
print_info " Specific simulator: IOS_SIMULATOR=<simulator-udid> yarn install:ios"
exit 1
fi
fi
fi

View file

@ -158,9 +158,12 @@
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */, 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */,
6C173A6450034E8CAB58FB0C /* Fix Xcode 15 Bug */, 6C173A6450034E8CAB58FB0C /* Fix Xcode 15 Bug */,
CBB0E03A64A84F6FB794EDB2 /* Upload Debug Symbols to Sentry */, CBB0E03A64A84F6FB794EDB2 /* Upload Debug Symbols to Sentry */,
6EA5AE3725914306AC3A5BE5 /* Remove signature files (Xcode workaround) */,
8A20F54D80BCC2E27CF783AE /* [CP] Embed Pods Frameworks */, 8A20F54D80BCC2E27CF783AE /* [CP] Embed Pods Frameworks */,
36EBB336DD5343908AA35FFC /* [CP-User] [RNFB] Core Configuration */, 36EBB336DD5343908AA35FFC /* [CP-User] [RNFB] Core Configuration */,
8EC12A68941D40E98E0D60BE /* Fix Xcode 15 Bug */,
49AEAB1D332B45ED9A37B009 /* Fix Xcode 15 Bug */,
D75A41050AB3445786799848 /* Fix Xcode 15 Bug */,
ABC6C5A0D48A4B7980D60E1B /* Remove signature files (Xcode workaround) */,
); );
buildRules = ( buildRules = (
); );
@ -473,6 +476,108 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh `${NODE_BINARY:-node} --print \"require('path').dirname(require.resolve('@sentry/react-native/package.json')) + '/scripts/sentry-xcode-debug-files.sh'\"`"; shellScript = "/bin/sh `${NODE_BINARY:-node} --print \"require('path').dirname(require.resolve('@sentry/react-native/package.json')) + '/scripts/sentry-xcode-debug-files.sh'\"`";
}; };
8EC12A68941D40E98E0D60BE /* 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";
};
700E335CAFA54AABB46BAB62 /* 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\";
";
};
49AEAB1D332B45ED9A37B009 /* 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";
};
E611D841DFAE4F71B8077AD3 /* 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\";
";
};
D75A41050AB3445786799848 /* 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";
};
ABC6C5A0D48A4B7980D60E1B /* 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 */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
@ -516,7 +621,7 @@
); );
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.alertesecours.alertesecours; PRODUCT_BUNDLE_IDENTIFIER = com.alertesecours.alertesecours;
PRODUCT_NAME = AlerteSecours; PRODUCT_NAME = "AlerteSecours";
SWIFT_OBJC_BRIDGING_HEADER = "AlerteSecours/AlerteSecours-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "AlerteSecours/AlerteSecours-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
@ -535,7 +640,7 @@
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 2PZ49Y23LX; DEVELOPMENT_TEAM = 2PZ49Y23LX;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64";
INFOPLIST_FILE = AlerteSecours/Info.plist; INFOPLIST_FILE = AlerteSecours/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.1; IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@ -547,7 +652,7 @@
); );
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.alertesecours.alertesecours; PRODUCT_BUNDLE_IDENTIFIER = com.alertesecours.alertesecours;
PRODUCT_NAME = AlerteSecours; PRODUCT_NAME = "AlerteSecours";
SWIFT_OBJC_BRIDGING_HEADER = "AlerteSecours/AlerteSecours-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "AlerteSecours/AlerteSecours-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View file

@ -2,6 +2,11 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>com.transistorsoft.fetch</string>
<string>com.transistorsoft.customtask</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key> <key>CADisableMinimumFrameDurationOnPhone</key>
<true/> <true/>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
@ -19,7 +24,7 @@
<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.11.0</string> <string>1.11.1</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
@ -42,7 +47,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>190</string> <string>191</string>
<key>ITSAppUsesNonExemptEncryption</key> <key>ITSAppUsesNonExemptEncryption</key>
<false/> <false/>
<key>LSApplicationQueriesSchemes</key> <key>LSApplicationQueriesSchemes</key>

View file

@ -1,6 +1,6 @@
{ {
"name": "alerte-secours", "name": "alerte-secours",
"version": "1.11.0", "version": "1.11.1",
"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",
@ -37,6 +37,7 @@
"e2e:test": "detox test --configuration android.emu.debug", "e2e:test": "detox test --configuration android.emu.debug",
"e2e:run": "yarn start & yarn e2e:build && yarn e2e:deploy && yarn e2e:test", "e2e:run": "yarn start & yarn e2e:build && yarn e2e:deploy && yarn e2e:test",
"install:android": "./install-android.sh", "install:android": "./install-android.sh",
"install:ios": "./install-ios.sh",
"log:android": "adb -s $DEVICE logcat | grep -E 'ReactNativeJS: '", "log:android": "adb -s $DEVICE logcat | grep -E 'ReactNativeJS: '",
"log:ios:simulator": "xcrun simctl spawn booted log stream --level debug --predicate 'subsystem contains \"com.facebook.react.log\" and processImagePath contains \"AlerteSecours\"'", "log:ios:simulator": "xcrun simctl spawn booted log stream --level debug --predicate 'subsystem contains \"com.facebook.react.log\" and processImagePath contains \"AlerteSecours\"'",
"log:ios": "idevicesyslog | grep -i 'AlerteSecours\\|ReactNative'", "log:ios": "idevicesyslog | grep -i 'AlerteSecours\\|ReactNative'",
@ -49,8 +50,8 @@
"screenshot:android": "scripts/screenshot-android.sh" "screenshot:android": "scripts/screenshot-android.sh"
}, },
"customExpoVersioning": { "customExpoVersioning": {
"versionCode": 190, "versionCode": 191,
"buildNumber": 190 "buildNumber": 191
}, },
"commit-and-tag-version": { "commit-and-tag-version": {
"scripts": { "scripts": {