From 0cf3ab7b4f5fed154630cacafb6897c7fef3e357 Mon Sep 17 00:00:00 2001 From: Daniel Arantes Loverde Date: Fri, 31 Jul 2026 13:41:31 -0300 Subject: [PATCH] [app-attest-env] Fix App Attest environment mismatch for distribution builds com.apple.developer.devicecheck.appattest-environment was hardcoded to "development" for every build, including the App Store/TestFlight distribution build. Apple's App Attest servers validate this claim against how the app was actually signed/distributed, so a "development" claim on a real distribution build fails - guest session handshake never gets past the challenge step, no store/city data ever loads. Parameterized per configuration: development for Debug, production for Release, via an APP_ATTEST_ENVIRONMENT build setting. --- Darwin/Entitlements.plist | 2 +- Darwin/PediFoods.xcodeproj/project.pbxproj | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Darwin/Entitlements.plist b/Darwin/Entitlements.plist index 70084b4..3376aa1 100644 --- a/Darwin/Entitlements.plist +++ b/Darwin/Entitlements.plist @@ -3,6 +3,6 @@ com.apple.developer.devicecheck.appattest-environment - development + $(APP_ATTEST_ENVIRONMENT) diff --git a/Darwin/PediFoods.xcodeproj/project.pbxproj b/Darwin/PediFoods.xcodeproj/project.pbxproj index 9a9e402..580bc88 100644 --- a/Darwin/PediFoods.xcodeproj/project.pbxproj +++ b/Darwin/PediFoods.xcodeproj/project.pbxproj @@ -178,6 +178,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 496EB72F2A6AE4DE00C1253B /* PediFoods.xcconfig */; buildSettings = { + APP_ATTEST_ENVIRONMENT = development; DEVELOPMENT_TEAM = K4E5BZMM4V; ENABLE_PREVIEWS = YES; INFOPLIST_KEY_CFBundleDisplayName = "Pedi Foods"; @@ -196,6 +197,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 496EB72F2A6AE4DE00C1253B /* PediFoods.xcconfig */; buildSettings = { + APP_ATTEST_ENVIRONMENT = production; CODE_SIGN_IDENTITY = "Apple Distribution"; CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = K4E5BZMM4V;