kasketis / netfox

A lightweight, one line setup, iOS / OSX network debugging library! 🦊
MIT License
3.68k stars 374 forks source link

Doesn't catch Kingfisher's image requests #167

Closed kohtenko closed 2 years ago

kohtenko commented 5 years ago

While using https://github.com/onevcat/Kingfisher to download, cache and display images, the library doesn't show those downloads at all

mullerfrederik commented 5 years ago
KingfisherManager.shared.downloader.sessionConfiguration = KingfisherSetup.configuration
import Foundation
import netfox

final class KingfisherSetup {
    static let configuration: URLSessionConfiguration = {
        let configuration = URLSessionConfiguration.default
        configuration.protocolClasses?.insert(NFXProtocol.self, at: 0)  <--- THIS :)
        configuration.requestCachePolicy = .returnCacheDataElseLoad
        configuration.urlCache = .shared
        return configuration
    }()
}
vGubriienko commented 2 years ago

Closed due to inactivity.