From 9c3a4150a56e81fd0fab06fef479c0d3c7a19184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Wed, 25 Sep 2024 13:48:24 +0200 Subject: [PATCH] Fix access level of SceneDelegate --- Sources/FuturedHelpers/Helpers/SceneDelegate.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/FuturedHelpers/Helpers/SceneDelegate.swift b/Sources/FuturedHelpers/Helpers/SceneDelegate.swift index 8a6d0f3..86fa16d 100644 --- a/Sources/FuturedHelpers/Helpers/SceneDelegate.swift +++ b/Sources/FuturedHelpers/Helpers/SceneDelegate.swift @@ -8,11 +8,11 @@ import SwiftUI #if !os(macOS) -protocol AppSceneDelegate: AnyObject, UIWindowSceneDelegate, ObservableObject { +public protocol AppSceneDelegate: AnyObject, UIWindowSceneDelegate, ObservableObject { var delegate: SceneDelegate? { get set } } -protocol SceneDelegate: AnyObject { +public protocol SceneDelegate: AnyObject { func sceneDidEnterBackground(_ scene: UIScene) func sceneWillEnterForeground(_ scene: UIScene) } @@ -37,7 +37,7 @@ extension View { /// - Description: /// In the main app root view call this modifier and pass the SceneDelegate. You need to specify the AppSceneDelegate which conforms to the UIWindowSceneDelegate. /// This is necessary because the SceneDelegate is accessible in SwiftUI only via EnviromentObject. - func set(appSceneDelegateClass: T.Type, sceneDelegate: SceneDelegate) -> some View { + public func set(appSceneDelegateClass: T.Type, sceneDelegate: SceneDelegate) -> some View { modifier(SceneDelegateWrapperViewModifier(delegate: sceneDelegate)) } }