pmusolino / Wormholy

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

Capture output to an external service #41

Closed richardtop closed 5 years ago

richardtop commented 5 years ago

I have an idea to be able to capture the i/o of the networking stack and to share it automatically to some server. Or, at least, be able to share all the captured information as archive.

pmusolino commented 5 years ago

I believe I could expose the model of requests. I put your proposal in the list of improvements.

richardtop commented 5 years ago

@pmusolino maybe, utilize Apple's OSLog somehow?

pmusolino commented 5 years ago

@richardtop I never used OSLog, but I see that if you don’t want OSLog on the Xcode console, you have to put OS_ACTIVITY_MODE Environment variable to “disable” in your scheme. This means that by default every detail of a request/response is printed in the console: a lot of output.

richardtop commented 5 years ago

@pmusolino I was thinking of somehow utilizing OSLog to capture output and send it to the remote location. But now I think, it's better to have some custom solution.

The goal is to be able to debug networking from user's devices which are not onsite.

pmusolino commented 5 years ago

I agree. The only solution is to create a web service. For the moment, the fastest solution is to expose requests, so that the developer can do what he wants.

richardtop commented 5 years ago

What you mean is to add an option to expose requests, so the developer could plug in its own module tied to a web service?

I was thinking about even simpler case - to store the data locally and share with the iOS default dialog image

pmusolino commented 5 years ago

@richardtop yes to everything.

Linked topic: https://github.com/pmusolino/Wormholy/issues/37

richardtop commented 5 years ago

Both approaches would be highly appreciated. In essence, you could use the interface to plug in your own share extension.

pmusolino commented 5 years ago

Yes, but the big question mark is the sharing format. Can a simple appropriately formatted text file be enough? What may be the use cases in your opinion?

richardtop commented 5 years ago

Let's take my use-case, for example. My app has an issues only with one particular user with one particular phone. I'd like to send him a custom build and ask to do certain actions. Then, he sends me the archive back, so I could trace, which requests succeeded and which failed.

The problem is that I can't just take that user's phone and connect it to a debugger, as he is in different location.

pmusolino commented 5 years ago

Your use case is clear. Ok, I'll work in the next few days. Stay tuned.

pmusolino commented 5 years ago

Implemented in this new release: https://github.com/pmusolino/Wormholy/releases/tag/1.2.1 Now you can copy or save requests in .txt. Also, requests are exposed to the developer.