pmusolino / Wormholy

iOS network debugging, like a wizard 🧙‍♂️
MIT License
2.31k stars 184 forks source link

Not Tracing API Call's - App using AFNetworking #94

Open Pulkit-1mg opened 3 years ago

Pulkit-1mg commented 3 years ago

I integrated the latest version of pod master branch 1.6.3 It is tracing network calls from third party sdk's only. Not tracing api calls in the app. My app is using AFNetworking for API calls.

AFNetworking pod v4.0.1

private class func shouldHandleRequest(_ request: URLRequest) -> Bool {
        guard let host = request.url?.host else { return false }

        return CustomHTTPProtocol.ignoredHosts.filter({ host.hasSuffix($0) }).isEmpty
    }

getting request. url as blank and host is nil

Description of request object -

about:blank ▿ url : Optional ▿ some : about:blank

  • _url : about:blank
    • cachePolicy : 0
    • timeoutInterval : 2147483647.0 ▿ mainDocumentURL : Optional ▿ some : about:blank
  • _url : about:blank
    • networkServiceType : __C.NSURLRequestNetworkServiceType
    • allowsCellularAccess : true ▿ httpMethod : Optional
    • some : "GET" ▿ allHTTPHeaderFields : Optional<Dictionary<String, String>> ▿ some : 1 element ▿ 0 : 2 elements
      • key : "Upgrade-Insecure-Requests"
      • value : "1"
    • httpBody : nil
    • httpBodyStream : nil
    • httpShouldHandleCookies : true
    • httpShouldUsePipelining : tru

e

pmusolino commented 2 years ago

I released a new (big) version of Wormholy (1.6.5) with some improvements and fixes. https://github.com/pmusolino/Wormholy/releases/tag/1.6.5 Can you test it and let me know if you are still encountering this issue?