Skip to content

Commit 7e08e6e

Browse files
authored
Cherry-pick fixing Xcode 13 beta 3 build issues (#8405) (#8410)
1 parent 5268705 commit 7e08e6e

26 files changed

+78
-22
lines changed

FirebaseAppCheck/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# v8.4.0 -- M100
2+
- [fixed] Fixed build issues introduced in Xcode 13 beta 3. (#8401)
23
- [fixed] Bump Promises dependency. (#8365)
34
# v8.3.0 -- M99
45
- [added] Token API for 3P use. (#8266)

FirebaseAppCheck/Tests/Unit/Swift/AppCheckAPITests.swift

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ final class AppCheckAPITests {
6868
#if swift(>=5.5)
6969
if #available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) {
7070
// async/await is a Swift 5.5+ feature available on iOS 15+
71-
async {
71+
Task {
7272
do {
7373
try await AppCheck.appCheck().token(forcingRefresh: false)
7474
} catch {
@@ -102,7 +102,7 @@ final class AppCheckAPITests {
102102
#if swift(>=5.5)
103103
if #available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) {
104104
// async/await is a Swift 5.5+ feature available on iOS 15+
105-
async {
105+
Task {
106106
do {
107107
_ = try await debugProvider.getToken()
108108
} catch {
@@ -160,29 +160,30 @@ final class AppCheckAPITests {
160160
// MARK: - DeviceCheckProvider
161161

162162
// `DeviceCheckProvider` initializer
163-
if let app = FirebaseApp.app(), let deviceCheckProvider = DeviceCheckProvider(app: app) {
164-
// Get token
165-
deviceCheckProvider.getToken { token, error in
166-
if let _ /* error */ = error {
167-
// ...
168-
} else if let _ /* token */ = token {
169-
// ...
163+
if #available(iOS 11.0, macOS 10.15, macCatalyst 13.0, tvOS 11.0, *) {
164+
if let app = FirebaseApp.app(), let deviceCheckProvider = DeviceCheckProvider(app: app) {
165+
// Get token
166+
deviceCheckProvider.getToken { token, error in
167+
if let _ /* error */ = error {
168+
// ...
169+
} else if let _ /* token */ = token {
170+
// ...
171+
}
170172
}
171-
}
172-
173-
// Get token (async/await)
174-
#if swift(>=5.5)
175-
if #available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) {
176-
// async/await is a Swift 5.5+ feature available on iOS 15+
177-
async {
178-
do {
179-
_ = try await deviceCheckProvider.getToken()
180-
} catch {
181-
// ...
173+
// Get token (async/await)
174+
#if swift(>=5.5)
175+
if #available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) {
176+
// async/await is a Swift 5.5+ feature available on iOS 15+
177+
Task {
178+
do {
179+
_ = try await deviceCheckProvider.getToken()
180+
} catch {
181+
// ...
182+
}
182183
}
183184
}
184-
}
185-
#endif // swift(>=5.5)
185+
#endif // swift(>=5.5)
186+
}
186187
}
187188
}
188189
}

FirebaseAppDistribution/Sources/FIRAppDistributionUIService.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ typedef void (^FIRFADUIActionCompletion)(BOOL continued)
3030

3131
/// An instance of this class provides UI elements required for the App Distribution tester
3232
/// authentication flow as an AppDelegate interceptor.
33+
34+
NS_EXTENSION_UNAVAILABLE_IOS("Firebase App Distribution is not supported for iOS extensions.")
3335
@interface FIRAppDistributionUIService : NSObject <UIApplicationDelegate,
3436
ASWebAuthenticationPresentationContextProviding,
3537
SFSafariViewControllerDelegate>

FirebaseAppDistribution/Sources/Public/FirebaseAppDistribution/FIRAppDistribution.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ NS_ASSUME_NONNULL_BEGIN
2626
* Note: The App Distribution class cannot be subclassed. If this makes testing difficult,
2727
* we suggest using a wrapper class or a protocol extension.
2828
*/
29+
30+
NS_EXTENSION_UNAVAILABLE_IOS("Firebase App Distribution is not supported for iOS extensions.")
2931
NS_SWIFT_NAME(AppDistribution)
3032
@interface FIRAppDistribution : NSObject
3133

FirebaseDynamicLinks/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v8.4.0
2+
- [fixed] Fixed build issues introduced in Xcode 13 beta 3. (#8401)
3+
- [fixed] Fixed build failures for extension targets. (#6548)
4+
15
# v8.2.0
26
- [fixed] Fixed analyze issue introduced in Xcode 12.5. (#8208)
37

FirebaseDynamicLinks/Sources/Public/FirebaseDynamicLinks/FIRDynamicLinks.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ NS_ASSUME_NONNULL_BEGIN
3333
* @class FIRDynamicLinks
3434
* @abstract A class that checks for pending Dynamic Links and parses URLs.
3535
*/
36+
37+
NS_EXTENSION_UNAVAILABLE_IOS("Firebase Dynamic Links is not supported for iOS extensions.")
3638
NS_SWIFT_NAME(DynamicLinks)
3739
@interface FIRDynamicLinks : NSObject
3840

FirebaseInAppMessaging/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 2021-7 --- v8.4.0
2+
- [fixed] Fixed build issues introduced in Xcode 13 beta 3. (#8401)
3+
14
# 2021-6 -- v.8.2.0
25
- [fixed] Fixed missing constraints warnings in default UI storyboard (#8205).
36

FirebaseInAppMessaging/Sources/DefaultUI/Banner/FIRIAMBannerViewController.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
@protocol FIRInAppMessagingDisplayDelegate;
2525

2626
NS_ASSUME_NONNULL_BEGIN
27+
28+
NS_EXTENSION_UNAVAILABLE_IOS("Firebase In App Messaging is not supported for iOS extensions.")
2729
@interface FIRIAMBannerViewController : FIRIAMBaseRenderingViewController
2830
+ (FIRIAMBannerViewController *)
2931
instantiateViewControllerWithResourceBundle:(NSBundle *)resourceBundle

FirebaseInAppMessaging/Sources/DefaultUI/Card/FIRIAMCardViewController.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
@protocol FIRInAppMessagingDisplayDelegate;
2121

2222
NS_ASSUME_NONNULL_BEGIN
23+
NS_EXTENSION_UNAVAILABLE_IOS("Firebase In App Messaging is not supported for iOS extensions.")
2324
@interface FIRIAMCardViewController : FIRIAMBaseRenderingViewController
2425

2526
+ (FIRIAMCardViewController *)

FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMBaseRenderingViewController.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
@protocol FIRInAppMessagingDisplayDelegate;
2323

2424
NS_ASSUME_NONNULL_BEGIN
25+
26+
NS_EXTENSION_UNAVAILABLE_IOS("Firebase In App Messaging is not supported for iOS extensions.")
2527
@interface FIRIAMBaseRenderingViewController : UIViewController
2628
@property(nonatomic, readwrite) id<FIRIAMTimeFetcher> timeFetcher;
2729

0 commit comments

Comments
 (0)