-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make App Check core availability for all supported platforms (#8388)
* Update App Check availability to match Core * AppAttest availability update * Fix watchOS * watchOS * style * fix import * Fix Xcode support before 12.5 * changelog * Comments * Use week linking for DeviceCheck framework * Fix mac catalyts version
- Loading branch information
1 parent
5268705
commit 85c42dc
Showing
16 changed files
with
134 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheckAvailability.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright 2021 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// Availability conditions for different App Check SDK components. | ||
|
||
#import <TargetConditionals.h> | ||
|
||
#pragma mark - DeviceCheck | ||
|
||
// Targets where DeviceCheck framework is available to be used in preprocessor conditions. | ||
#define FIR_DEVICE_CHECK_SUPPORTED_TARGETS TARGET_OS_IOS || TARGET_OS_OSX || TARGET_OS_TV | ||
|
||
// `DeviceCheckProvider` availability. | ||
#define FIR_DEVICE_CHECK_PROVIDER_AVAILABILITY \ | ||
API_AVAILABLE(ios(11.0), macos(10.15), tvos(11.0)) API_UNAVAILABLE(watchos) | ||
|
||
#pragma mark - App Attest | ||
|
||
// App Attest availability was extended to macOS and Mac Catalyst in Xcode 12.5. | ||
#if (defined(__IPHONE_14_5) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_5) || \ | ||
(defined(__MAC_11_3) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_11_3) || \ | ||
(defined(__TVOS_14_5) && __TV_OS_VERSION_MAX_ALLOWED >= __TVOS_14_5) | ||
|
||
// Targets where `DCAppAttestService` is available to be used in preprocessor conditions. | ||
#define FIR_APP_ATTEST_SUPPORTED_TARGETS TARGET_OS_IOS || TARGET_OS_OSX | ||
|
||
// `AppAttestProvider` availability annotations | ||
#define FIR_APP_ATTEST_PROVIDER_AVAILABILITY \ | ||
API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(tvos, watchos) | ||
|
||
#else // (defined(__IPHONE_14_5) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_5) || \ | ||
(defined(__MAC_11_3) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_11_3) || \ | ||
(defined(__TVOS_14_5) && __TV_OS_VERSION_MAX_ALLOWED >= __TVOS_14_5) | ||
|
||
// Targets where `DCAppAttestService` is available to be used in preprocessor conditions. | ||
#define FIR_APP_ATTEST_SUPPORTED_TARGETS TARGET_OS_IOS && !TARGET_OS_MACCATALYST | ||
|
||
// `AppAttestProvider` availability annotations | ||
#define FIR_APP_ATTEST_PROVIDER_AVAILABILITY \ | ||
API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(macos, tvos, watchos) | ||
|
||
#endif // (defined(__IPHONE_14_5) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_5) || \ | ||
(defined(__MAC_11_3) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_11_3) || \ | ||
(defined(__TVOS_14_5) && __TV_OS_VERSION_MAX_ALLOWED >= __TVOS_14_5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters