InterposeKit icon indicating copy to clipboard operation
InterposeKit copied to clipboard

Crash when hooking NSURL

Open 623637646 opened this issue 5 years ago • 0 comments

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
Screenshot 2020-11-19 at 10 27 15 AM

it's similar with this issue. https://github.com/steipete/Aspects/issues/177

623637646 avatar Nov 19 '20 02:11 623637646