diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample.xcodeproj/project.pbxproj b/Examples/SUICoordinatorExample/SUICoordinatorExample.xcodeproj/project.pbxproj
index 9d65f46..f22eb5b 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample.xcodeproj/project.pbxproj
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample.xcodeproj/project.pbxproj
@@ -445,7 +445,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 16.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
@@ -502,7 +502,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 16.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
@@ -529,7 +529,7 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
- IPHONEOS_DEPLOYMENT_TARGET = 16.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -566,7 +566,7 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
- IPHONEOS_DEPLOYMENT_TARGET = 16.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample.xcodeproj/xcshareddata/xcschemes/SUICoordinatorExample.xcscheme b/Examples/SUICoordinatorExample/SUICoordinatorExample.xcodeproj/xcshareddata/xcschemes/SUICoordinatorExample.xcscheme
new file mode 100644
index 0000000..5d3c55d
--- /dev/null
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample.xcodeproj/xcshareddata/xcschemes/SUICoordinatorExample.xcscheme
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample.xcodeproj/xcuserdata/pwman.xcuserdatad/xcschemes/xcschememanagement.plist b/Examples/SUICoordinatorExample/SUICoordinatorExample.xcodeproj/xcuserdata/pwman.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..8aa0fe9
--- /dev/null
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample.xcodeproj/xcuserdata/pwman.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,22 @@
+
+
+
+
+ SchemeUserState
+
+ SUICoordinatorExample.xcscheme_^#shared#^_
+
+ orderHint
+ 0
+
+
+ SuppressBuildableAutocreation
+
+ D953891C2B643BAD000E3357
+
+ primary
+
+
+
+
+
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/App/AppDelegate.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/App/AppDelegate.swift
index 5fa6d61..c12c366 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/App/AppDelegate.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/App/AppDelegate.swift
@@ -8,6 +8,7 @@
import SwiftUI
import SUICoordinator
+@available(iOS 16.0, *)
class AppDelegate: NSObject, UIApplicationDelegate {
var mainCoodinator: (any CoordinatorType)?
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/App/SUICoordinatorExampleApp.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/App/SUICoordinatorExampleApp.swift
index acc7c0a..04b3c5d 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/App/SUICoordinatorExampleApp.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/App/SUICoordinatorExampleApp.swift
@@ -7,6 +7,7 @@
import SwiftUI
+@available(iOS 16.0, *)
@main
struct SUICoordinatorExampleApp: App {
@UIApplicationDelegateAdaptor private var appDelegate: AppDelegate
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/CustomTabbar/CustomTabbarCoordinator.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/CustomTabbar/CustomTabbarCoordinator.swift
index 2d09d5b..771e602 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/CustomTabbar/CustomTabbarCoordinator.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/CustomTabbar/CustomTabbarCoordinator.swift
@@ -26,6 +26,7 @@ import Foundation
import Combine
import SUICoordinator
+@available(iOS 16.0, *)
public class CustomTabbarCoordinator: TabbarCoordinator {
// ---------------------------------------------------------------------
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/CustomTabbar/CustomTabbarView.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/CustomTabbar/CustomTabbarView.swift
index d243562..ae44d1a 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/CustomTabbar/CustomTabbarView.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/CustomTabbar/CustomTabbarView.swift
@@ -24,6 +24,7 @@
import SwiftUI
+@available(iOS 16.0, *)
struct CustomTabbarView: View {
// ---------------------------------------------------------------------
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/CustomTabbar/CustomTabbarViewModel.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/CustomTabbar/CustomTabbarViewModel.swift
index f00c955..65db301 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/CustomTabbar/CustomTabbarViewModel.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/CustomTabbar/CustomTabbarViewModel.swift
@@ -25,6 +25,7 @@
import Foundation
import SUICoordinator
+@available(iOS 16.0, *)
class CustomTabbarViewModel: ObservableObject {
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/DefaultTabbar/DefaultTabbarCoordinator.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/DefaultTabbar/DefaultTabbarCoordinator.swift
index ab80bfa..4e2d408 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/DefaultTabbar/DefaultTabbarCoordinator.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/DefaultTabbar/DefaultTabbarCoordinator.swift
@@ -25,6 +25,7 @@
import Foundation
import SUICoordinator
+@available(iOS 16.0, *)
class DefaultTabbarCoordinator: TabbarCoordinator {
// ---------------------------------------------------------------------
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/DefaultTabbar/MyTabbarPage.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/DefaultTabbar/MyTabbarPage.swift
index e45edf4..010461d 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/DefaultTabbar/MyTabbarPage.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/DefaultTabbar/MyTabbarPage.swift
@@ -26,6 +26,7 @@ import SUICoordinator
import SwiftUI
+@available(iOS 16.0, *)
public enum MyTabbarPage: TabbarPage, CaseIterable {
case first
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/HomeCoordinator/HomeCoordinator.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/HomeCoordinator/HomeCoordinator.swift
index e20a75b..04ad66d 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/HomeCoordinator/HomeCoordinator.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/HomeCoordinator/HomeCoordinator.swift
@@ -25,6 +25,7 @@
import SUICoordinator
import Foundation
+@available(iOS 16.0, *)
class HomeCoordinator: Coordinator {
private let animated: Bool = true
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/HomeCoordinator/HomeRoute.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/HomeCoordinator/HomeRoute.swift
index 088d9bf..ccd70a6 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/HomeCoordinator/HomeRoute.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/HomeCoordinator/HomeRoute.swift
@@ -25,6 +25,7 @@
import Foundation
import SUICoordinator
+@available(iOS 16.0, *)
enum HomeRoute: RouteType {
case push(viewModel: PushViewModel)
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/MainCoordinator/MainCoordinator.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/MainCoordinator/MainCoordinator.swift
index dd4d188..62ba877 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/MainCoordinator/MainCoordinator.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/MainCoordinator/MainCoordinator.swift
@@ -24,6 +24,7 @@
import SUICoordinator
+@available(iOS 16.0, *)
class MainCoordinator: Coordinator {
override init() {
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/MainCoordinator/MainRoute.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/MainCoordinator/MainRoute.swift
index 6b79103..093294c 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/MainCoordinator/MainRoute.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/MainCoordinator/MainRoute.swift
@@ -33,6 +33,7 @@ enum MainRoute: RouteType {
// MARK: RouteType
// ---------------------------------------------------------
+ @available(iOS 16.0, *)
public var presentationStyle: TransitionPresentationStyle {
switch self {
case .splash:
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/TabbarFlow/TabbarFlowCoordinator.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/TabbarFlow/TabbarFlowCoordinator.swift
index d84bdb0..a50676a 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/TabbarFlow/TabbarFlowCoordinator.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Coordinators/TabbarFlow/TabbarFlowCoordinator.swift
@@ -25,6 +25,7 @@
import Foundation
import SUICoordinator
+@available(iOS 16.0, *)
class TabbarFlowCoordinator: Coordinator {
// ---------------------------------------------------------------------
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/ActionList/ActionListViewModel.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/ActionList/ActionListViewModel.swift
index bf1eaa4..c2980c5 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/ActionList/ActionListViewModel.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/ActionList/ActionListViewModel.swift
@@ -24,6 +24,7 @@
import Foundation
+@available(iOS 16.0, *)
class ActionListViewModel: ObservableObject {
let coordinator: HomeCoordinator
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/ActionList/NavigationActionListView.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/ActionList/NavigationActionListView.swift
index b1a729a..51f912a 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/ActionList/NavigationActionListView.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/ActionList/NavigationActionListView.swift
@@ -24,6 +24,7 @@
import SwiftUI
+@available(iOS 16.0, *)
struct NavigationActionListView: View {
typealias ViewModel = ActionListViewModel
@@ -66,6 +67,7 @@ struct NavigationActionListView: View {
}
}
+@available(iOS 16.0, *)
#Preview {
NavigationActionListView(viewModel: .init(coordinator: .init()))
}
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/DetentsView/DetentsView.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/DetentsView/DetentsView.swift
index 2c32a75..a3102d8 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/DetentsView/DetentsView.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/DetentsView/DetentsView.swift
@@ -24,6 +24,7 @@
import SwiftUI
+@available(iOS 16.0, *)
struct DetentsView: View {
typealias ViewModel = DetentsViewModel
@@ -50,6 +51,7 @@ struct DetentsView: View {
}
}
+@available(iOS 16.0, *)
#Preview {
DetentsView(viewModel: .init(coordinator: .init()))
}
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/DetentsView/DetentsViewModel.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/DetentsView/DetentsViewModel.swift
index d767427..6c43b84 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/DetentsView/DetentsViewModel.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/DetentsView/DetentsViewModel.swift
@@ -24,6 +24,7 @@
import Foundation
+@available(iOS 16.0, *)
class DetentsViewModel: ObservableObject {
let coordinator: HomeCoordinator
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/FullscreenView/FullscreenView.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/FullscreenView/FullscreenView.swift
index ea60e28..68f38a0 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/FullscreenView/FullscreenView.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/FullscreenView/FullscreenView.swift
@@ -24,6 +24,7 @@
import SwiftUI
+@available(iOS 16.0, *)
struct FullscreenView: View {
typealias ViewModel = FullscreenViewModel
@@ -50,6 +51,7 @@ struct FullscreenView: View {
}
}
+@available(iOS 16.0, *)
#Preview {
FullscreenView(viewModel: .init(coordinator: .init()))
}
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/FullscreenView/FullscreenViewModel.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/FullscreenView/FullscreenViewModel.swift
index 1fb95e1..7eae071 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/FullscreenView/FullscreenViewModel.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/FullscreenView/FullscreenViewModel.swift
@@ -24,6 +24,7 @@
import Foundation
+@available(iOS 16.0, *)
class FullscreenViewModel: ObservableObject {
let coordinator: HomeCoordinator
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/PushView/PushView.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/PushView/PushView.swift
index 8f054e1..f4f422e 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/PushView/PushView.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/PushView/PushView.swift
@@ -24,6 +24,7 @@
import SwiftUI
+@available(iOS 16.0, *)
struct PushView: View {
typealias ViewModel = PushViewModel
@@ -50,6 +51,7 @@ struct PushView: View {
}
}
+@available(iOS 16.0, *)
#Preview {
PushView(viewModel: .init(coordinator: .init()))
}
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/PushView/PushViewModel.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/PushView/PushViewModel.swift
index c3e39dd..0ed1d02 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/PushView/PushViewModel.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/PushView/PushViewModel.swift
@@ -24,6 +24,7 @@
import Foundation
+@available(iOS 16.0, *)
class PushViewModel: ObservableObject {
unowned var coordinator: HomeCoordinator
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/SheetView/SheetView.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/SheetView/SheetView.swift
index df3320e..63afee6 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/SheetView/SheetView.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/SheetView/SheetView.swift
@@ -24,6 +24,7 @@
import SwiftUI
+@available(iOS 16.0, *)
struct SheetView: View {
typealias ViewModel = SheetViewModel
@@ -50,6 +51,7 @@ struct SheetView: View {
}
}
+@available(iOS 16.0, *)
#Preview {
SheetView(viewModel: .init(coordinator: .init()))
}
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/SheetView/SheetViewModel.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/SheetView/SheetViewModel.swift
index 36899ea..2db8c3c 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/SheetView/SheetViewModel.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/Home/SheetView/SheetViewModel.swift
@@ -24,6 +24,7 @@
import Foundation
+@available(iOS 16.0, *)
class SheetViewModel: ObservableObject {
let coordinator: HomeCoordinator
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/TabbarFlow/TabbarActionList/TabbarActionListView.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/TabbarFlow/TabbarActionList/TabbarActionListView.swift
index 13f300c..c034b48 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/TabbarFlow/TabbarActionList/TabbarActionListView.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/TabbarFlow/TabbarActionList/TabbarActionListView.swift
@@ -24,6 +24,7 @@
import SwiftUI
+@available(iOS 16.0, *)
struct TabbarActionListView: View {
typealias ViewModel = TabbarActionListViewModel
@@ -56,6 +57,7 @@ struct TabbarActionListView: View {
}
}
+@available(iOS 16.0, *)
#Preview {
NavigationActionListView(viewModel: .init(coordinator: .init()))
}
diff --git a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/TabbarFlow/TabbarActionList/TabbarActionListViewModel.swift b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/TabbarFlow/TabbarActionList/TabbarActionListViewModel.swift
index 0f3672c..22bb847 100644
--- a/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/TabbarFlow/TabbarActionList/TabbarActionListViewModel.swift
+++ b/Examples/SUICoordinatorExample/SUICoordinatorExample/Modules/TabbarFlow/TabbarActionList/TabbarActionListViewModel.swift
@@ -24,6 +24,7 @@
import Foundation
+@available(iOS 16.0, *)
class TabbarActionListViewModel: ObservableObject {
let coordinator: TabbarFlowCoordinator
diff --git a/Package.swift b/Package.swift
index d9fec64..74ecf9b 100644
--- a/Package.swift
+++ b/Package.swift
@@ -5,7 +5,7 @@ import PackageDescription
let package = Package(
name: "SUICoordinator",
- platforms: [.iOS(.v16)],
+ platforms: [.iOS(.v15)],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
// .executable(name: "SUICoordinator", targets: ["SUICoordinator"]),
diff --git a/Sources/SUICoordinator/Coordinator/Coordinator.swift b/Sources/SUICoordinator/Coordinator/Coordinator.swift
index 3f0af6e..9b9c942 100644
--- a/Sources/SUICoordinator/Coordinator/Coordinator.swift
+++ b/Sources/SUICoordinator/Coordinator/Coordinator.swift
@@ -29,6 +29,7 @@ import SwiftUI
/// An open class representing a coordinator in a coordinator-based architecture.
///
/// Coordinators are responsible for coordinating the navigation and flow within an application.
+@available(iOS 16.0, *)
open class Coordinator: ObservableObject, CoordinatorType {
// --------------------------------------------------------------------
diff --git a/Sources/SUICoordinator/Coordinator/CoordinatorView.swift b/Sources/SUICoordinator/Coordinator/CoordinatorView.swift
index f117773..f082250 100644
--- a/Sources/SUICoordinator/Coordinator/CoordinatorView.swift
+++ b/Sources/SUICoordinator/Coordinator/CoordinatorView.swift
@@ -25,6 +25,7 @@
import SwiftUI
+@available(iOS 16.0, *)
public struct CoordinatorView: CoordinatorViewType, View {
// --------------------------------------------------------------------
diff --git a/Sources/SUICoordinator/CoordinatorType/CoordinatorType+Helpers.swift b/Sources/SUICoordinator/CoordinatorType/CoordinatorType+Helpers.swift
index 16b5df1..4dae6dd 100644
--- a/Sources/SUICoordinator/CoordinatorType/CoordinatorType+Helpers.swift
+++ b/Sources/SUICoordinator/CoordinatorType/CoordinatorType+Helpers.swift
@@ -24,6 +24,7 @@
import Foundation
+@available(iOS 16.0, *)
extension CoordinatorType {
/// The root router associated with the coordinator.
diff --git a/Sources/SUICoordinator/CoordinatorType/CoordinatorType+Navigation.swift b/Sources/SUICoordinator/CoordinatorType/CoordinatorType+Navigation.swift
index 7133413..277a900 100644
--- a/Sources/SUICoordinator/CoordinatorType/CoordinatorType+Navigation.swift
+++ b/Sources/SUICoordinator/CoordinatorType/CoordinatorType+Navigation.swift
@@ -24,6 +24,7 @@
import Foundation
+@available(iOS 16.0, *)
public extension CoordinatorType {
/// Retrieves the top coordinator in the hierarchy, optionally starting from a specified coordinator.
diff --git a/Sources/SUICoordinator/CoordinatorType/CoordinatorType.swift b/Sources/SUICoordinator/CoordinatorType/CoordinatorType.swift
index 014bccf..c330a39 100644
--- a/Sources/SUICoordinator/CoordinatorType/CoordinatorType.swift
+++ b/Sources/SUICoordinator/CoordinatorType/CoordinatorType.swift
@@ -31,6 +31,7 @@ import SwiftUI
/// of a specific module or feature in an application.
///
/// - Important: Adopt this protocol in your custom coordinator implementations.
+@available(iOS 16.0, *)
public protocol CoordinatorType: SCHashable, AnyObject {
// ---------------------------------------------------------
diff --git a/Sources/SUICoordinator/Router/DefaultRoute.swift b/Sources/SUICoordinator/Router/DefaultRoute.swift
index d02f957..2aa16f9 100644
--- a/Sources/SUICoordinator/Router/DefaultRoute.swift
+++ b/Sources/SUICoordinator/Router/DefaultRoute.swift
@@ -26,6 +26,7 @@ import Foundation
import SwiftUI
/// A struct representing a default route with a specified presentation style and content view.
+@available(iOS 16.0, *)
public struct DefaultRoute: RouteType {
// ---------------------------------------------------------
diff --git a/Sources/SUICoordinator/Router/RouteType.swift b/Sources/SUICoordinator/Router/RouteType.swift
index f377caa..e42800e 100644
--- a/Sources/SUICoordinator/Router/RouteType.swift
+++ b/Sources/SUICoordinator/Router/RouteType.swift
@@ -31,6 +31,7 @@ import SwiftUI
Conforming types must provide a type alias `Body`, which represents the body of the route and conforms to the `View` protocol.
*/
+@available(iOS 16.0, *)
public protocol RouteType: SCHashable {
// ---------------------------------------------------------
diff --git a/Sources/SUICoordinator/Router/Router.swift b/Sources/SUICoordinator/Router/Router.swift
index be165af..21bcb7b 100644
--- a/Sources/SUICoordinator/Router/Router.swift
+++ b/Sources/SUICoordinator/Router/Router.swift
@@ -30,6 +30,7 @@ import SwiftUI
/// Routers are responsible for the actual navigation and presentation of
/// views or coordinators within a coordinator-based architecture.
+@available(iOS 16.0, *)
public class Router: ObservableObject, RouterType {
// --------------------------------------------------------------------
@@ -205,6 +206,7 @@ public class Router: ObservableObject, RouterType {
}
+@available(iOS 16.0, *)
fileprivate extension Router {
// --------------------------------------------------------------------
diff --git a/Sources/SUICoordinator/Router/RouterType.swift b/Sources/SUICoordinator/Router/RouterType.swift
index 78d1cd9..5634ada 100644
--- a/Sources/SUICoordinator/Router/RouterType.swift
+++ b/Sources/SUICoordinator/Router/RouterType.swift
@@ -13,6 +13,7 @@ import Combine
///
/// Routers are responsible for the actual navigation and presentation of
/// views or coordinators within a coordinator-based architecture.
+@available(iOS 16.0, *)
public protocol RouterType: ObservableObject {
// --------------------------------------------------------------------
@@ -105,6 +106,7 @@ public protocol RouterType: ObservableObject {
func restart(animated: Bool) async -> Void
}
+@available(iOS 16.0, *)
extension RouterType {
@MainActor func removeNilItemsFromSheetCoordinator() -> Void {
diff --git a/Sources/SUICoordinator/Router/RouterView.swift b/Sources/SUICoordinator/Router/RouterView.swift
index e5e36f5..370e451 100644
--- a/Sources/SUICoordinator/Router/RouterView.swift
+++ b/Sources/SUICoordinator/Router/RouterView.swift
@@ -25,6 +25,7 @@
import SwiftUI
import Combine
+@available(iOS 16.0, *)
struct RouterView: View {
// --------------------------------------------------------------------
diff --git a/Sources/SUICoordinator/Router/TransitionPresentationStyle.swift b/Sources/SUICoordinator/Router/TransitionPresentationStyle.swift
index 23924e5..0ea265e 100644
--- a/Sources/SUICoordinator/Router/TransitionPresentationStyle.swift
+++ b/Sources/SUICoordinator/Router/TransitionPresentationStyle.swift
@@ -29,6 +29,7 @@ import SwiftUI
TransitionPresentationStyle enumerates the different styles used for transitioning between views or presenting views within an application.
*/
+@available(iOS 16.0, *)
public enum TransitionPresentationStyle: SCEquatable {
/// A push transition style, commonly used in navigation controllers.
diff --git a/Sources/SUICoordinator/Shared/Protocols/SheetItemType.swift b/Sources/SUICoordinator/Shared/Protocols/SheetItemType.swift
index 3b7160f..aad3d93 100644
--- a/Sources/SUICoordinator/Shared/Protocols/SheetItemType.swift
+++ b/Sources/SUICoordinator/Shared/Protocols/SheetItemType.swift
@@ -24,6 +24,7 @@
import Foundation
+@available(iOS 16.0, *)
protocol SheetItemType: SCIdentifiable {
/// A boolean value indicating whether to animate the presentation.
var animated: Bool { get set }
diff --git a/Sources/SUICoordinator/Shared/View+Helpers/ViewDidLoadModifier.swift b/Sources/SUICoordinator/Shared/View+Helpers/ViewDidLoadModifier.swift
index 7b2f12f..9a95615 100644
--- a/Sources/SUICoordinator/Shared/View+Helpers/ViewDidLoadModifier.swift
+++ b/Sources/SUICoordinator/Shared/View+Helpers/ViewDidLoadModifier.swift
@@ -24,6 +24,7 @@
import SwiftUI
+@available(iOS 16.0, *)
public extension View {
func sheetCoordinator(
diff --git a/Sources/SUICoordinator/SheetCoordinator/SheetCoordinator.swift b/Sources/SUICoordinator/SheetCoordinator/SheetCoordinator.swift
index f8d42f7..7ecb09b 100644
--- a/Sources/SUICoordinator/SheetCoordinator/SheetCoordinator.swift
+++ b/Sources/SUICoordinator/SheetCoordinator/SheetCoordinator.swift
@@ -29,6 +29,7 @@ import SwiftUI
/// A class representing a coordinator for managing and presenting sheets.
///
/// Sheet coordinators handle the presentation and removal of sheets in a coordinator-based architecture.
+@available(iOS 16.0, *)
final public class SheetCoordinator: ObservableObject {
// ---------------------------------------------------------
diff --git a/Sources/SUICoordinator/SheetCoordinator/SheetCoordinatorType.swift b/Sources/SUICoordinator/SheetCoordinator/SheetCoordinatorType.swift
index 63dc4b5..cc3360e 100644
--- a/Sources/SUICoordinator/SheetCoordinator/SheetCoordinatorType.swift
+++ b/Sources/SUICoordinator/SheetCoordinator/SheetCoordinatorType.swift
@@ -28,6 +28,7 @@ import SwiftUI
///
/// Sheet coordinator types define the interface for handling the presentation and removal of sheets
/// in a coordinator-based architecture.
+@available(iOS 16.0, *)
public protocol SheetCoordinatorType: ObservableObject {
// ---------------------------------------------------------
diff --git a/Sources/SUICoordinator/SheetCoordinator/SheetCoordinatorView.swift b/Sources/SUICoordinator/SheetCoordinator/SheetCoordinatorView.swift
index 0dc435d..b924d58 100644
--- a/Sources/SUICoordinator/SheetCoordinator/SheetCoordinatorView.swift
+++ b/Sources/SUICoordinator/SheetCoordinator/SheetCoordinatorView.swift
@@ -25,6 +25,7 @@
import SwiftUI
import Combine
+@available(iOS 16.0, *)
struct SheetCoordinatorView: ViewModifier {
// ---------------------------------------------------------
diff --git a/Sources/SUICoordinator/SheetCoordinator/SheetItem.swift b/Sources/SUICoordinator/SheetCoordinator/SheetItem.swift
index 1911e18..dfa9bc2 100644
--- a/Sources/SUICoordinator/SheetCoordinator/SheetItem.swift
+++ b/Sources/SUICoordinator/SheetCoordinator/SheetItem.swift
@@ -27,6 +27,7 @@ import Foundation
/// A class representing a sheet item for presenting views or coordinators in a coordinator-based architecture.
///
/// Sheet items encapsulate information about the view, animation, and presentation style.
+@available(iOS 16.0, *)
final public class SheetItem: SCHashable, SheetItemType {
// ---------------------------------------------------------
diff --git a/Sources/SUICoordinator/SheetCoordinator/SheetView.swift b/Sources/SUICoordinator/SheetCoordinator/SheetView.swift
index 6d808dc..b20ec2b 100644
--- a/Sources/SUICoordinator/SheetCoordinator/SheetView.swift
+++ b/Sources/SUICoordinator/SheetCoordinator/SheetView.swift
@@ -24,6 +24,7 @@
import SwiftUI
+@available(iOS 16.0, *)
struct SheetView: View {
typealias Item = T
diff --git a/Sources/SUICoordinator/Tabbar/PageDataSource.swift b/Sources/SUICoordinator/Tabbar/PageDataSource.swift
index aeadc73..c257772 100644
--- a/Sources/SUICoordinator/Tabbar/PageDataSource.swift
+++ b/Sources/SUICoordinator/Tabbar/PageDataSource.swift
@@ -60,5 +60,6 @@ public extension PageDataSource where Self: CaseIterable {
}
/// A type alias representing a page in a tabbar navigation with both `PageDataSource` and `TabbarNavigationRouter` conformances.
+@available(iOS 16.0, *)
public typealias TabbarPage = PageDataSource & TabbarNavigationRouter
diff --git a/Sources/SUICoordinator/Tabbar/TabbarCoordinator.swift b/Sources/SUICoordinator/Tabbar/TabbarCoordinator.swift
index 91cb30a..df1f9b4 100644
--- a/Sources/SUICoordinator/Tabbar/TabbarCoordinator.swift
+++ b/Sources/SUICoordinator/Tabbar/TabbarCoordinator.swift
@@ -28,6 +28,7 @@ import Combine
/// An open class representing a coordinator for managing a tabbar-based navigation.
///
/// Tabbar coordinators handle the navigation and coordination of pages within a tabbar.
+@available(iOS 16.0, *)
open class TabbarCoordinator: Coordinator, TabbarCoordinatorType where Page: TabbarPage {
// --------------------------------------------------------------------
diff --git a/Sources/SUICoordinator/Tabbar/TabbarCoordinatorType.swift b/Sources/SUICoordinator/Tabbar/TabbarCoordinatorType.swift
index 7e0443e..44740f0 100644
--- a/Sources/SUICoordinator/Tabbar/TabbarCoordinatorType.swift
+++ b/Sources/SUICoordinator/Tabbar/TabbarCoordinatorType.swift
@@ -28,6 +28,7 @@ import Combine
/// A protocol representing a type for managing and coordinating a tabbar-based navigation.
///
/// Tabbar coordinator types define the interface for handling the selected page and badge updates.
+@available(iOS 16.0, *)
public protocol TabbarCoordinatorType {
// ---------------------------------------------------------
@@ -58,4 +59,5 @@ public protocol TabbarCoordinatorType {
}
/// A type alias representing a coordinator that conforms to both `CoordinatorType` and `TabbarCoordinatorType`.
+@available(iOS 16.0, *)
public typealias TabbarCoordinatable = CoordinatorType & TabbarCoordinatorType
diff --git a/Sources/SUICoordinator/Tabbar/TabbarCoordinatorView.swift b/Sources/SUICoordinator/Tabbar/TabbarCoordinatorView.swift
index bd9d44d..89bd353 100644
--- a/Sources/SUICoordinator/Tabbar/TabbarCoordinatorView.swift
+++ b/Sources/SUICoordinator/Tabbar/TabbarCoordinatorView.swift
@@ -25,6 +25,7 @@
import SwiftUI
import Foundation
+@available(iOS 16.0, *)
struct TabbarCoordinatorView: View {
typealias BadgeItem = (value: String?, page: PAGE)
@@ -84,6 +85,7 @@ struct TabbarCoordinatorView: View {
}
+@available(iOS 16.0, *)
extension TabbarCoordinatorView {
private func tabSelection() -> Binding {
diff --git a/Sources/SUICoordinator/Tabbar/TabbarNavigationRouter.swift b/Sources/SUICoordinator/Tabbar/TabbarNavigationRouter.swift
index e5b701e..1838ac7 100644
--- a/Sources/SUICoordinator/Tabbar/TabbarNavigationRouter.swift
+++ b/Sources/SUICoordinator/Tabbar/TabbarNavigationRouter.swift
@@ -25,6 +25,7 @@
import Foundation
/// A protocol representing a type for managing and providing a coordinator for tabbar navigation.
+@available(iOS 16.0, *)
public protocol TabbarNavigationRouter {
// ---------------------------------------------------------