Am I able to see what Logger logs from my app when it's running on a device belonging to an external tester if my app doesn't crash? Am I able to see the logs if my app does crash?
I am using Swift with Xcode for iOS.
Am I able to see what Logger logs from my app when it's running on a device belonging to an external tester if my app doesn't crash? Am I able to see the logs if my app does crash?
I am using Swift with Xcode for iOS.
Logger, do you mean the print you put in code ?
AFAIK, no.
Logger is a wrapper around os_log and friends, that is, it logs to the unified system log. You can view that in a variety of was:
By connecting the iOS to a Mac and running Console.
Or Apple Configurator.
Or Xcode.
By triggering a sysdiagnose log, moving the log to a Mac (AirDrop is great for this), unpacking it, and opening the .logarchive file in Console.
In code, you can get log events using the OSLog framework. On iOS you are restricting to calling init(scope:) with a scope of .currentProcessIdentifier, meaning you’ll only see log entries for your own process.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"