Skip to content

Commit dd874df

Browse files
carson-katrisupernintendo
authored andcommitted
Add init to LiveSessionConfiguration
1 parent 8f5703d commit dd874df

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Sources/LiveViewNative/Coordinators/LiveSessionConfiguration.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ public struct LiveSessionConfiguration {
2727
public init() {
2828
}
2929

30+
public init(
31+
navigationMode: NavigationMode? = nil,
32+
connectParams: ((URL) -> [String: Any])? = nil,
33+
urlSession: URLSession? = nil
34+
) {
35+
if let navigationMode {
36+
self.navigationMode = navigationMode
37+
}
38+
if let connectParams {
39+
self.connectParams = connectParams
40+
}
41+
if let urlSession {
42+
self.urlSession = urlSession
43+
}
44+
}
45+
3046
/// Possible modes for live view navigation.
3147
public enum NavigationMode {
3248
/// Navigation is entirely disabled. The live view will stay on the URL it was initially connected to.

0 commit comments

Comments
 (0)