From fdd4f290a489c41ac3f3420c82feb8d9994ee85a Mon Sep 17 00:00:00 2001 From: Felippe Costa Date: Fri, 6 Feb 2026 17:33:04 -0300 Subject: [PATCH] feat: enable App Attest and add environment-based API config --- .../xcschemes/ExampleApp.xcscheme | 78 +++++++++++++++++++ .../xcschemes/xcschememanagement.plist | 15 +++- ExampleApp/ExampleApp/ExampleAppApp.swift | 13 ++-- 3 files changed, 98 insertions(+), 8 deletions(-) create mode 100644 ExampleApp/ExampleApp.xcodeproj/xcshareddata/xcschemes/ExampleApp.xcscheme diff --git a/ExampleApp/ExampleApp.xcodeproj/xcshareddata/xcschemes/ExampleApp.xcscheme b/ExampleApp/ExampleApp.xcodeproj/xcshareddata/xcschemes/ExampleApp.xcscheme new file mode 100644 index 0000000..4768ae2 --- /dev/null +++ b/ExampleApp/ExampleApp.xcodeproj/xcshareddata/xcschemes/ExampleApp.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ExampleApp/ExampleApp.xcodeproj/xcuserdata/felippecosta.xcuserdatad/xcschemes/xcschememanagement.plist b/ExampleApp/ExampleApp.xcodeproj/xcuserdata/felippecosta.xcuserdatad/xcschemes/xcschememanagement.plist index 9d56fd5..96bbb11 100644 --- a/ExampleApp/ExampleApp.xcodeproj/xcuserdata/felippecosta.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/ExampleApp/ExampleApp.xcodeproj/xcuserdata/felippecosta.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,20 @@ ExampleApp.xcscheme_^#shared#^_ orderHint - 1 + 0 + + Promises (Playground).xcscheme + + orderHint + 2 + + + SuppressBuildableAutocreation + + 52D1F9EA2F258D7600810D03 + + primary + diff --git a/ExampleApp/ExampleApp/ExampleAppApp.swift b/ExampleApp/ExampleApp/ExampleAppApp.swift index 3089b8e..f627de3 100644 --- a/ExampleApp/ExampleApp/ExampleAppApp.swift +++ b/ExampleApp/ExampleApp/ExampleAppApp.swift @@ -27,14 +27,13 @@ class AppDelegate: NSObject, UIApplicationDelegate { // App Check provider factory - renamed to avoid conflict with protocol class SignedShotAppCheckProviderFactory: NSObject, AppCheckProviderFactory { func createProvider(with app: FirebaseApp) -> (any AppCheckProvider)? { - // TODO: Re-enable App Attest once configuration issue is resolved - // #if targetEnvironment(simulator) - // Use debug provider for now (both simulator and device) + #if targetEnvironment(simulator) + // Use debug provider for simulator return AppCheckDebugProvider(app: app) - // #else - // // Use App Attest for real devices - // return AppAttestProvider(app: app) - // #endif + #else + // Use App Attest for real devices + return AppAttestProvider(app: app) + #endif } }