From 2f6a7dbe6c8ba19fbb6463ad73e75e4db8c19f25 Mon Sep 17 00:00:00 2001 From: Ryan Lepinski Date: Thu, 28 Sep 2023 20:42:42 -0700 Subject: [PATCH] Fix watchOS build --- Airship/AirshipCore/Source/BannerView.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Airship/AirshipCore/Source/BannerView.swift b/Airship/AirshipCore/Source/BannerView.swift index 97f038030..5c2dcfabd 100644 --- a/Airship/AirshipCore/Source/BannerView.swift +++ b/Airship/AirshipCore/Source/BannerView.swift @@ -1,7 +1,11 @@ /* Copyright Airship and Contributors */ import SwiftUI + +#if canImport(UIKit) import UIKit +#endif + struct BannerView: View { @@ -66,6 +70,8 @@ struct BannerView: View { } } +#if !os(watchOS) + private func createBanner( placement: BannerPlacement, metrics: GeometryProxy @@ -122,6 +128,7 @@ struct BannerView: View { .constraints(contentConstraints, alignment: alignment, fixedSize: true) .applyIf(ignoreSafeArea) { $0.edgesIgnoringSafeArea(.all)} } +#endif private func resolvePlacement( orientation: Orientation,