pmusolino / Wormholy

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

Wormholy is re-enabled when referencing default or ephemeral session configs after being previously disabling #69

Open colinhumber opened 4 years ago

colinhumber commented 4 years ago

If I call the Wormholy.enable(_:sessionConfiguration:) to disable logging of network traffic on either the URLSessionConfiguration.default or URLSessionConfiguration.ephemeral, the next time either of those configurations are referenced, Wormholy will re-enable logging for those configurations as the swizzled accessors in NSURLSessionConfiguration+Wormholy automatically enable logging.

As of now, I'm not really sure how to completely disable logging without completely removing the framework.

pmusolino commented 4 years ago

Hi there! Thanks for discovering this bug. I think I understand where the problem is, but I'm not able to test it. Do you have a test project, where can I replicate this issue?

colinhumber commented 4 years ago

Sure thing. I've attached a project and commented the affected lines in AppDelegate.swift. wormholytest.zip

volbap commented 3 years ago

Hi there, I had the same issue. I just created a pull request that hopefully solves it.

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?