Skip to content

Instantly share code, notes, and snippets.

@Francescu
Last active December 23, 2015 14:09
Show Gist options
  • Save Francescu/a49552641d3f7534719a to your computer and use it in GitHub Desktop.
Save Francescu/a49552641d3f7534719a to your computer and use it in GitHub Desktop.
Segmentation fault 11
protocol Hook {
var matchingPaths: [Int : String] { get }
var matchingVars: [Int : String] { get }
func match(pathComponents: [String]) -> String?
}
extension Hook {
func match(pathComponents: [String], queryString: String) -> String? {
return nil
}
}
struct UniversalLinkHook: Hook {
let matchingPaths: [Int : String]
let matchingVars: [Int : String]
init(string: String) {
// (matchingPaths, matchingVars) = parseHook(string)
matchingPaths = [Int : String]()
matchingVars = [Int : String]()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment