Skip to content

Commit 330bed4

Browse files
committed
Fix Catalyst tests for #7050
1 parent e15bb36 commit 330bed4

File tree

3 files changed

+16
-27
lines changed

3 files changed

+16
-27
lines changed

.github/workflows/auth.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,11 @@ jobs:
6767
# Don't run on private repo unless it is a PR.
6868
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
6969
runs-on: macOS-latest
70-
steps:
71-
- uses: actions/checkout@v2
72-
- name: Xcode 12
73-
run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
74-
- name: Initialize xcodebuild
75-
run: xcodebuild -list
76-
- name: iOS Unit Tests
77-
run: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit iOS spm
78-
79-
spm-cron:
80-
# Don't run on private repo.
81-
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
82-
runs-on: macOS-latest
8370
strategy:
8471
matrix:
85-
target: [tvOS, macOS, catalyst]
72+
target: [iOS, tvOS, macOS, catalyst]
8673
steps:
8774
- uses: actions/checkout@v2
88-
- name: Xcode 12
89-
run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
9075
- name: Initialize xcodebuild
9176
run: xcodebuild -list
9277
- name: Unit Tests

FirebaseAuth/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 7.3.0
2+
- [fixed] Catalyst browser issue with `verifyPhoneNumber` API. (#7049)
3+
14
# 7.1.0
25
- [fixed] Fixed completion handler issue in `application(_:didReceiveRemoteNotification:fetchCompletionHandler:)` method. (#6863)
36

FirebaseAuth/Tests/Unit/FIRAuthURLPresenterTests.m

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,18 @@ - (void)testFIRAuthURLPresenterUsingDefaultUIDelegate:(BOOL)usesDefaultUIDelegat
101101
[invocation getArgument:&unretainedArgument atIndex:2];
102102

103103
id presentViewController = unretainedArgument;
104-
if (@available(iOS 9.0, *)) { // SFSafariViewController is available
105-
SFSafariViewController *viewController = presentViewController;
106-
XCTAssertTrue([viewController isKindOfClass:[SFSafariViewController class]]);
107-
XCTAssertEqual(viewController.delegate, presenter);
108-
} else {
109-
UINavigationController *navigationController = presentViewController;
110-
XCTAssertTrue([navigationController isKindOfClass:[UINavigationController class]]);
111-
FIRAuthWebViewController *webViewController =
112-
navigationController.viewControllers.firstObject;
113-
XCTAssertTrue([webViewController isKindOfClass:[FIRAuthWebViewController class]]);
114-
}
104+
#if TARGET_OS_MACCATALYST
105+
// SFSafariViewController is not available
106+
UINavigationController *navigationController = presentViewController;
107+
XCTAssertTrue([navigationController isKindOfClass:[UINavigationController class]]);
108+
FIRAuthWebViewController *webViewController =
109+
navigationController.viewControllers.firstObject;
110+
XCTAssertTrue([webViewController isKindOfClass:[FIRAuthWebViewController class]]);
111+
#else
112+
SFSafariViewController *viewController = presentViewController;
113+
XCTAssertTrue([viewController isKindOfClass:[SFSafariViewController class]]);
114+
XCTAssertEqual(viewController.delegate, presenter);
115+
#endif
115116
[UIPresentationExpectation fulfill];
116117
});
117118

0 commit comments

Comments
 (0)