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

[App Check] Fix App Attest and DeviceCheck API availability #11662

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

andrewheard
Copy link
Contributor

  • Updated the FIR_DEVICE_CHECK_PROVIDER_AVAILABILITY and FIR_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.
  • Removed the #if TARGET_OS_IOS compiler directive in AppCheckAPITests.swift since TARGET_OS_IOS is only available in Objective-C and was always false.

#no-changelog

Copy link
Member

@ncooke3 ncooke3 left a comment

Choose a reason for hiding this comment

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

Nice cleanup!

@andrewheard andrewheard marked this pull request as ready for review August 8, 2023 21:25
@ncooke3
Copy link
Member

ncooke3 commented Aug 8, 2023

Xcode 13 made that macro an eyesore so it's really great that it's readable again!

@andrewheard andrewheard merged commit 4b9cbf6 into master Aug 8, 2023
33 checks passed
Copy link
Member

@paulb777 paulb777 left a comment

Choose a reason for hiding this comment

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

Why is visionOS never mentioned?

@andrewheard andrewheard deleted the ah/appcheck-swift-test branch August 8, 2023 21:26
@andrewheard
Copy link
Contributor Author

Why is visionOS never mentioned?

@paulb777 TARGET_OS_IOS is true when compiling for visionOS so we can omit a TARGET_OS_VISION check (but I could add || TARGET_OS_VISION for clarity -- just let me know).

DeviceCheck and App Attest are both supported on visionOS 1.0+ Beta and API_AVAILABLE(ios(11.0), macos(10.15), macCatalyst(13.0), tvos(11.0), watchos(9.0)) in ObjC is equivalent to @available(iOS 11, macOS 10.15, macCatalyst 13, tvOS 11, watchOS 9, *) in Swift. visionOS 1 falls through the unspecified platforms (*) so the API is available there.

@paulb777
Copy link
Member

paulb777 commented Aug 8, 2023

Thanks. I'm good to leave it as is.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants