Closed TheDom closed 2 years ago
Hi, thanks for reporting that. I’m currently on vacation, so I will be able to take a look at it at the end of August. But for now, it could be helpful if you could tell me what iOS version you’re checking, as the requests logging works a little bit differently on iOS 9.
Thank you for the quick reply, I appreciate it! :) We encountered this with Xcode 9.4.1 on the iOS 11.4 simulator.
First of all - sorry for a late response.
I can't reproduce that issue. Would it be possible to provide a small repo showing that problem? Or maybe you (or anyone else facing this issue) could add the needed code in DBURLProtocol.m
?
Probably it is needed to implement the - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)newRequest completionHandler:(void (^)(NSURLRequest *))completionHandler
method there. You could take a look for example here to see the implementation of that method in a NSURLProtocol
subclass.
For now I'm labeling this issue with "help needed". PRs are welcome! 😉
Thanks for looking into this issue!
While I am currently not able to look into a solution myself, I was able to put together a sample project as requested: DBDebugToolkitIssue22Sample.zip. Just open AppDelegate.swift
for the relevant code. Please let me know if you have any further questions. 😃
We use AFNetworking and have code like the following
After we integrated
DBDebugToolkit
we noticed that this block was not getting called anymore. Disabling networking logging viaDBDebugToolkit.setNetworkRequestsLoggingEnabled(false)
fixes the issue.I looked at AFNetworking's related code (part 1, part 2) and it does not seem to do anything special which leads me to believe that this is a general issue.
Please let me know if additional information is needed to reproduce this behavior.