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)) } }