From aea78214120d871f1c293a3cc8e284d6cdcdac6d Mon Sep 17 00:00:00 2001 From: npub12wpjffj7q5qjsky5jvk4ldwlxmse5xll3d8gytk4wqd0c5y7jvwspg37n6 <538324a65e0501285894932d5fb5df36e19a1bff8b4e822ed5701afc509e931d@buzz.block.builderlab.xyz> Date: Sat, 1 Aug 2026 15:32:53 -0700 Subject: [PATCH] fix(mobile/ios): enable Debug compilation condition Co-authored-by: Tom Brow Signed-off-by: Tom Brow --- mobile/ios/Flutter/Debug.xcconfig | 1 + scripts/test-mobile-worktree-overrides.sh | 25 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/mobile/ios/Flutter/Debug.xcconfig b/mobile/ios/Flutter/Debug.xcconfig index 1bb634c21..74e8247c0 100644 --- a/mobile/ios/Flutter/Debug.xcconfig +++ b/mobile/ios/Flutter/Debug.xcconfig @@ -1,5 +1,6 @@ #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" +SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) DEBUG // Default app bundle identifier. Internal/custom builds can override this // without patching tracked files by writing diff --git a/scripts/test-mobile-worktree-overrides.sh b/scripts/test-mobile-worktree-overrides.sh index 308021855..cb11e8738 100755 --- a/scripts/test-mobile-worktree-overrides.sh +++ b/scripts/test-mobile-worktree-overrides.sh @@ -206,6 +206,31 @@ for key in BUNDLE_IDENTIFIER BUZZ_KEYCHAIN_ACCESS_GROUP BUZZ_IOS_PUSH_ENVIRONMEN assert_single_xcconfig_declaration "$release_xcconfig" "$key" "Release" done +# SWIFT_ACTIVE_COMPILATION_CONDITIONS is checked separately from the closed +# identity census above. This is a tracked-source assertion only; resolved Xcode +# build settings are intentionally outside this Linux-compatible test. +assert_xcconfig_value "$debug_xcconfig" \ + '^SWIFT_ACTIVE_COMPILATION_CONDITIONS = \$\(inherited\) DEBUG$' \ + "Debug Swift compilation conditions inherit DEBUG" + +debug_swift_condition_count=$(grep -cE \ + '^[[:space:]]*SWIFT_ACTIVE_COMPILATION_CONDITIONS([[:space:]]*\[[^]]*\])*[[:space:]]*=' \ + "$debug_xcconfig" || true) +if [[ "$debug_swift_condition_count" -eq 1 ]]; then + pass "Debug SWIFT_ACTIVE_COMPILATION_CONDITIONS has one tracked declaration site" +else + fail "Debug SWIFT_ACTIVE_COMPILATION_CONDITIONS has $debug_swift_condition_count tracked declaration sites; expected exactly one" +fi + +release_swift_condition_count=$(grep -cE \ + '^[[:space:]]*SWIFT_ACTIVE_COMPILATION_CONDITIONS([[:space:]]*\[[^]]*\])*[[:space:]]*=' \ + "$release_xcconfig" || true) +if [[ "$release_swift_condition_count" -eq 0 ]]; then + pass "Release SWIFT_ACTIVE_COMPILATION_CONDITIONS has no tracked declaration sites" +else + fail "Release SWIFT_ACTIVE_COMPILATION_CONDITIONS has $release_swift_condition_count tracked declaration sites; expected zero" +fi + # Split the retired identifiers so the regression test does not match itself. retired_bundle_id='com.buzz.buzz'"Mobile" if git -C "$repo_root" grep -q -F "$retired_bundle_id"; then