Modifying all HTTP requests on iPhoneOS with MobileSubstrate?

Posted by Yifan on Stack Overflow See other posts from Stack Overflow or by Yifan
Published on 2010-04-29T00:53:09Z Indexed on 2010/04/29 0:57 UTC
Read the original article Hit count: 295

I want to write a MobileSubstrate (http://www.iphonedevwiki.net/index.php/MobileSubstrate) addon that takes every HTTP request and modifies the URL. (The reason is very complicated and would take a while to explain, so just trust me that there's not an alternative). Basically, I need to know what's the best Objective-C message or C function that I should overwrite to intercept any HTTP request, modify the URL, and send the request back to the original function (this shouldn't be just the first request sent by an application, but any redirects too). I think it may be in NSURL or CFNetwork, but am not sure where exactly. This function should, when replaced, work with any apps and the OS itself.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c