Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix App Attest and DeviceCheck API availability #10

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

andrewheard
Copy link
Collaborator

Ported the changes from firebase/firebase-ios-sdk#11662 into AppCheckCore:

  • Updated the GAC_DEVICE_CHECK_PROVIDER_AVAILABILITY and GAC_APP_ATTEST_PROVIDER_AVAILABILITY API availability macros to reflect the set of supported platforms for DeviceCheck (iOS 11+, macOS 10.15+, macCatalyst 13+, tvOS 11+, watchOS 9+) and App Attest (iOS 14+, macOS 11.3+, macCatalyst 14.5+, tvOS 15+, watchOS 9+).
  • Removed the extraneous check for the watchOS 9 SDK since Xcode 14 is the minimum supported by App Check.

- Updated the GAC_DEVICE_CHECK_PROVIDER_AVAILABILITY and
GAC_APP_ATTEST_PROVIDER_AVAILABILITY API availability macros to reflect
the set of supported platforms for DeviceCheck (iOS 11+, macOS 10.15+,
macCatalyst 13+, tvOS 11+, watchOS 9+) and App Attest (iOS 14+, macOS
11.3+, macCatalyst 14.5+, tvOS 15+, watchOS 9+).

- Removed the extraneous check for the watchOS 9 SDK now that Xcode 14
is the minimum supported by Firebase.
@andrewheard andrewheard marked this pull request as ready for review August 11, 2023 19:56
provider.getToken { token, error in
// ...
}
if #available(iOS 14.0, macOS 11.3, macCatalyst 14.5, tvOS 15.0, watchOS 9.0, *) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentionally adding macOS?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think I overcautiously omitted macOS when splitting this off from FirebaseAppCheck. In the original code it was #if TARGET_OS_IOS (always false in Swift). I changed it to #if os(iOS) || os(tvOS) || os(watchOS) when I forked it but the API is also available on macOS (including Catalyst) so I just dropped the os() conditionals entirely. This also allows it to work on visionOS since it falls through the * in the if #available.

@andrewheard andrewheard merged commit c3bf9c2 into main Aug 11, 2023
9 checks passed
@andrewheard andrewheard deleted the ah/api-availability branch August 11, 2023 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants