From 453700eb5670e57bf0c5b5efd2b3c1ea5d59434f Mon Sep 17 00:00:00 2001 From: Oguz Yuksel <74555694+OguzYuuksel@users.noreply.github.com> Date: Mon, 29 Jan 2024 11:31:23 +0100 Subject: [PATCH] Update dependencies & add @haifengkao request. (#68) * wrap iOS only codes by #if clause @haifengkao * update dependencies --------- Co-authored-by: Oguz Yuksel --- Package.resolved | 4 ++-- Sources/UIExtensions/Extensions/UIWindow+MotionEnded.swift | 2 ++ .../UIExtensions/ViewModifiers/ShakeGestureViewModifier.swift | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Package.resolved b/Package.resolved index a4dff0c..6fcda80 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/teufelaudio/FoundationExtensions.git", "state" : { - "revision" : "6b9bd39109a1634112c325aa2e4a6a63d58a6254", - "version" : "0.5.1" + "revision" : "c441f8fa10ee6c93ce4d4d3939a8bd683987e48f", + "version" : "0.6.2" } }, { diff --git a/Sources/UIExtensions/Extensions/UIWindow+MotionEnded.swift b/Sources/UIExtensions/Extensions/UIWindow+MotionEnded.swift index 9992eb5..98823b3 100644 --- a/Sources/UIExtensions/Extensions/UIWindow+MotionEnded.swift +++ b/Sources/UIExtensions/Extensions/UIWindow+MotionEnded.swift @@ -1,5 +1,6 @@ // Copyright © 2023 Lautsprecher Teufel GmbH. All rights reserved. +#if canImport(UIKit) import UIKit extension NSNotification.Name { @@ -17,3 +18,4 @@ extension UIWindow { } } } +#endif diff --git a/Sources/UIExtensions/ViewModifiers/ShakeGestureViewModifier.swift b/Sources/UIExtensions/ViewModifiers/ShakeGestureViewModifier.swift index d179514..7baf959 100644 --- a/Sources/UIExtensions/ViewModifiers/ShakeGestureViewModifier.swift +++ b/Sources/UIExtensions/ViewModifiers/ShakeGestureViewModifier.swift @@ -1,7 +1,7 @@ // Copyright © 2023 Lautsprecher Teufel GmbH. All rights reserved. +#if canImport(SwiftUI) && canImport(UIKit) import SwiftUI - struct ShakeGestureViewModifier: ViewModifier { let action: () -> Void @@ -17,3 +17,4 @@ extension View { self.modifier(ShakeGestureViewModifier(action: action)) } } +#endif