1

I'm using something similar to this code to read the console on a physical device, which works great. (Using iOS 7.1.2 on an iPhone 5.)

However, when I run it on the iOS Simulator (7.1.2 and Xcode 5.1.1), I get no responses from asl_search.

I've found this question which looks like it would be a duplicate, but it doesn't specify programmatic reading of the logs. So there are various solutions that require knowledge of where the actual log files live on disk.

Is there a reliable way to get asl logs on the simulator from within my app's objective-c code?

I'd like to be able to say "if device, read from asl, else if simulator, get some other way".

Is there some library that abstracts the differences in where the logs are stored? Ideally I'd like to get the log data back in the same format, so I can handle it the same way whether I'm running on a device or the simulator.

Also, I know I can't get the full syslog past iOS 6, on a real device. That's OK--I just want a way to get whatever info is available, even if it's just logs from my own app.

Community
  • 1
  • 1
funroll
  • 35,925
  • 7
  • 54
  • 59

0 Answers0