Skip to content

Commit

Permalink
Merge pull request #29 from futuredapp/fix/Access-control-of-SceneDel…
Browse files Browse the repository at this point in the history
…egate

Fix access level of SceneDelegate
  • Loading branch information
samoilyk authored Sep 26, 2024
2 parents 5f7a43e + 9c3a415 commit a682316
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/FuturedHelpers/Helpers/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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<T: AppSceneDelegate>(appSceneDelegateClass: T.Type, sceneDelegate: SceneDelegate) -> some View {
public func set<T: AppSceneDelegate>(appSceneDelegateClass: T.Type, sceneDelegate: SceneDelegate) -> some View {
modifier(SceneDelegateWrapperViewModifier<T>(delegate: sceneDelegate))
}
}
Expand Down

0 comments on commit a682316

Please sign in to comment.