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 VisionOS and WatchOS CI #12966

Merged
merged 6 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/spm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,15 @@ jobs:
strategy:
matrix:
# Full set of Firebase-Package tests only run on iOS. Run subset on other platforms.
# visionOS isn't buildable from here (even with Firestore source) because the test
# targets need Analytics.
target: [tvOS, macOS, catalyst]
os: [macos-13, macos-14]
include:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_15.3
- os: macos-14
target: visionOS
xcode: Xcode_15.3
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayExecutor.m
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,10 @@ - (void)displayMessageLoadError:(NSError *)error {
return;
}
self.alertWindow = [[UIWindow alloc] initWithWindowScene:foregroundedScene];
#if TARGET_OS_IOS || TARGET_OS_TV
} else {
self.alertWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
#endif
}
UIViewController *alertViewController = [[UIViewController alloc] init];
self.alertWindow.rootViewController = alertViewController;
Expand Down
10 changes: 8 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,12 @@ tvos_flags=(
-destination 'platform=tvOS Simulator,name=Apple TV'
)
watchos_flags=(
-sdk 'watchsimulator'
-destination 'platform=watchOS Simulator,name=Apple Watch Series 7 (45mm)'
)
visionos_flags=(
-destination 'platform=visionOS Simulator'
-sdk 'xrsimulator'
-destination 'platform=visionOS Simulator,name=Apple Vision Pro'
)
catalyst_flags=(
ARCHS=x86_64 VALID_ARCHS=x86_64 SUPPORTS_MACCATALYST=YES -sdk macosx
Expand Down Expand Up @@ -409,12 +411,16 @@ case "$product-$platform-$method" in
fi
;;

# TODO: This is actually building for iOS instead of watchOS. Update to use
# watchOS xcb_flags along with the watchOS sdk option. Also nanopb and promises
# podspecs need minimum version updates.

MessagingSampleStandaloneWatchApp-*-*)
if check_secrets; then
RunXcodebuild \
-workspace 'FirebaseMessaging/Apps/SampleStandaloneWatchApp/SampleStandaloneWatchApp.xcworkspace' \
-scheme "SampleStandaloneWatchApp Watch App" \
"${xcb_flags[@]}" \
-destination 'platform=watchOS Simulator,name=Apple Watch Series 7 (45mm)' \
build
fi
;;
Expand Down
Loading