I have an iOS app with a network extension that's using OSLog to log various bits of information that are useful for debugging.
I'm currently trying to add a simple button that bundles up those logs with some other information and presents the user with a Share sheet so they can send it to support teams.
I looked at OSLogStore but it only collects logs for the current process so the user clicking a button in my app wouldn't collect logs from my network extension.
I would really like to avoid having to guide users through the process of creating and sharing a sysdiagnose but it seems like this might be the only option. How do other folks do this kind of thing? Is there a recommended way to do it?
OSLogStore … it only collects logs for the current process
Correct, at least on everything except the Mac. I cover this and many other logging topics in Your Friend the System Log.
There isn’t truly a happy path here. When it comes to NE debugging, you need to see the full system log and there are no APIs on iOS that’ll let you get that.
Oh, one last thing. If you’re goal is to work with Apple to help debug a problem, you can ask your user to file a bug in Feedback Assistant. That’ll attach a sysdiagnose log to the bug report. You won’t be able to see the sysdiagnose log, but if you pass the Apple folks that bug number they should be able to get it.
I talk more about this idea in Using a Sysdiagnose Log to Debug a Hard-to-Reproduce Problem.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"