First, it's important to know that, OSLogStore didn't work in iOS as recently as 4 months ago. Since that's so recent and documentation is so sparse, what may have been true a year ago may not be true today.
Here's some context to my question (pretty much stolen from this reddit post):
I have about a 1000 users for an open source app I developed and every now and then users will report some odd behavior.
The app uses [Logger] to log important events ... Is there a remote logging service that can be used so that I can get this info and resolve issues for users?
I only care if the unified logging system has a solution to this problem. Let's assume I'm able to converse with the user with the "odd behavior" and they are non-technical.
I've been given some hints that OSLogStore may be a way to get remote logs, but the official documentation is so sparse, I can't tell. Specifically, that init(url:) seems interesting, but maybe it only accepts file:// protocols or something.
The logging documentation says it can be used "When you are unable to attach a debugger to the app, such as when you’re diagnosing problems on a user’s machine," but nowhere does it say how to do this.
re: @RobNapier's comment on the original post that says, “The only question is whether you can get logs off of remote devices ... and even that is pretty tricky.” I'm starting to think
OSLogStoreonly gets local logs, but this enables you to send them anywhere, or do anything you want with them, really.Now that
OSLogStoreworks on iOS, you can put a button in your app labeled "Send logs to dev," where clicking it sends the logs to a custom endpoint on your server. That requires two steps:Get the local logs.
Another part of the article you linked says:
Send them to a custom endpoint on your server. With that function in your code base, I think you can use it like this:
The one part that gives me pause is @RobNapier said getting "logs off of remote devices ... is pretty tricky." That makes me think there is something I'm missing. Hopefully @RobNapier will point out the flaws in my thinking.