diff --git a/.github/workflows/spm.yml b/.github/workflows/spm.yml index 2628cde075c..7a180ebb240 100644 --- a/.github/workflows/spm.yml +++ b/.github/workflows/spm.yml @@ -88,6 +88,8 @@ 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: @@ -95,9 +97,6 @@ jobs: 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 diff --git a/FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayExecutor.m b/FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayExecutor.m index 61d756d7b35..c7b10afe459 100644 --- a/FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayExecutor.m +++ b/FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayExecutor.m @@ -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; diff --git a/scripts/build.sh b/scripts/build.sh index 55d9b7cf39c..e57d1ef6775 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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 @@ -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 ;;