diff --git a/Source/Turbo Navigator/TurboNavigator.swift b/Source/Turbo Navigator/TurboNavigator.swift index 74b715e..5c9c1be 100644 --- a/Source/Turbo Navigator/TurboNavigator.swift +++ b/Source/Turbo Navigator/TurboNavigator.swift @@ -42,10 +42,11 @@ public class TurboNavigator { /// Convenience function to routing a proposal directly. /// /// - Parameter url: the URL to visit - public func route(_ url: URL) { + /// - Parameter bundle: provide context relevant to `url` + public func route(_ url: URL, bundle: [String: Any]? = nil) { let options = VisitOptions(action: .advance, response: nil) let properties = session.pathConfiguration?.properties(for: url) ?? PathProperties() - route(VisitProposal(url: url, options: options, properties: properties)) + route(VisitProposal(url: url, options: options, properties: properties, bundle: bundle)) } /// Transforms `VisitProposal` -> `UIViewController` diff --git a/Source/Visit/VisitProposal.swift b/Source/Visit/VisitProposal.swift index 32d8237..7db06a0 100644 --- a/Source/Visit/VisitProposal.swift +++ b/Source/Visit/VisitProposal.swift @@ -4,10 +4,15 @@ public struct VisitProposal { public let url: URL public let options: VisitOptions public let properties: PathProperties + public let bundle: [String: Any]? - public init(url: URL, options: VisitOptions, properties: PathProperties = [:]) { + public init(url: URL, + options: VisitOptions, + properties: PathProperties = [:], + bundle: [String: Any]? = nil) { self.url = url self.options = options self.properties = properties + self.bundle = bundle } }