Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
Description
AppleProvider.appAttestWithDeviceCheckFallbackchose its provider on OS version alone, so on macOS 14+ it always installedAppAttestProviderand never fell back to DeviceCheck. Since App Attest also requires device support — commonly absent on macOS — every token request then failed with "The attestation provider AppAttestProvider is not supported on current platform and OS version", raised by the SDK atgetTokentime rather than at activation.AppAttestProvider(app:)is declared nullable but never returns nil in the current SDK, so nothing surfaced the problem earlier either.The fix checks
DCAppAttestService.shared.isSupported— the same capability the SDK checks — before selecting App Attest, and falls back toDeviceCheckProviderotherwise:The
??also covers the nullable initializer, so the fallback holds if a future SDK version starts returning nil. iOS behaviour is unchanged where App Attest is supported. Callers can dropPlatform.isMacOSspecial-casing after this.Not addressed here: DeviceCheck being unreliable on some macOS versions is upstream (firebase-ios-sdk#10095, still open). Separately, the
appAttestcase immediately above silently substitutesAppCheckDebugProviderwhen the OS is too old — shipping a debug provider in a release build seems worse than a clear error, but that is a behaviour change and is left out of this PR deliberately.Related Issues
Checklist
///).melos run analyze) does not report any problems on my PR.Breaking Change