DeepLink

public struct DeepLink

Decompose deep link into scheme name, link name and parameters array

Usage: let url = URL(string: myapp://host/path?param1=123¶m2=abc)! if let deepLinkComponents = CNLDeepLink.parseURL(url) { print(deepLinkComponents.scheme) print(deepLinkComponents.host) print(deepLinkComponents.path) if let param: Int = deepLinkComponents.parameters[param1] { print(param) } if let param: String = deepLinkComponents.parameters[param2] { print(param) } }

  • Parse URL and creates CNLDeepLinkComponents struct

    Declaration

    Swift

    public static func parseURL(_ url: URL) -> DeepLinkComponents?

    Parameters

    url

    Source url

    Return Value

    Result CNLDeepLinkComponents struct