iSECPartners/Introspy-iOS

Can't hook NSURLSession's *taskWithURL* methods

radj opened this issue · 1 comments

radj commented

I created a new file with this content:

%hook NSURLSession
- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler {    
    NSLog(@"Hooked");
    return %orig(request, completionHandler);
}
%end

And added this file in one of the %group #include's in Tweak.xmi. I don't understand why this doesn't get hooked. What's wrong here? I understand this may not be specific to Introspy but I just thought I'd try asking here.