Can you use macOS "log stream" or "log show" to get messages from connected iOS devices? Can you use macOS "log stream" or "log show" to get messages from connected iOS devices? ios ios

Can you use macOS "log stream" or "log show" to get messages from connected iOS devices?


log collect --device lets you retrieve log archives that can be passed into log show --archive system_logs.logarchive with all the options you're familiar with.

Use log collect --device to automatically guess the device you're referring to.log collect device-name="Maxs iPhone" or log collect device-udid=abcdefg to collect from a particular device.

log collect --output /your/path will save it to your specified file name or directory. If --output is not given, your output will be in the current directory as system_logs.logarchive.

Note: I occasionally get errors about log: failed to create archive: Device not configured (6) or log: failed to create archive: Connection reset by peer (54) but if I just rerun the command it'll sometimes work 🤷🏾‍♀️


i'm not sure this helps but if you have access to the source code of the app you want to log, you can add NSLog prints and send them to a file, which you can view/retrieve with iTunes Connect (there is a small change you need to add to the .plist file about file-sharing).


matomo