InterposeKit
InterposeKit copied to clipboard
Crash when hooking NSURL
let object = NSURL.init(string: "https://www.google.com")!
let hook = try? object.hook(
#selector(getter: NSURL.host),
methodSignature: (@convention(c) (AnyObject, Selector) -> String).self,
hookSignature: (@convention(block) (AnyObject) -> String).self) { store in { `self` in
return "http://www.facebook.com"
}
}
let host = object.host
it's similar with this issue. https://github.com/steipete/Aspects/issues/177