Is there an iOS app which allows to look at console output created by another iOS app?
My app has several NSLog() calls which output precise timings. I would like to test the app, when it is not connected to my development Mac, and look at timings after that, possibly still on my iDevice using some other "console browser" app.
Is that possible?
So the way to do this is to use the Apple System Logger which allows you to access the logs and you can then display them on screen. NSLog will be logged to this. I wrote something a few years ago so that testers could test the app and open the log and view it on the device.
Its a bit tricky to use the interface and there is a limit, I think it was 200, on the number of logs in the cache, so log only the necessary stuff.
After a quick search, I found this - SOLogger which should help you.
Related
While developping an app for an iPad on my Mac, I use print logs to monitor what is going on (regular prints in Swift code). However I really don't like the Xcode console, and I'd like to be able to redirect the stream to a file, where I can then read it with a better log viewer (and add color!).
I'm executing the app in debug mode through Wifi on my iPad, but I want the logs on my Mac, so storing the logs to a file on the device is not really interesting (SO question here). Wrapping the debugger executable seems interesting, as suggested here but I couldn't find anything more recent (with lldb).
Alternatively, I could also run the debugger from the console and handler the redirection from there, but I don't know how to do that for debugging on a remote device over WiFi.
Any help would be greatly appreciated!
I have an iOS app that I side-loaded to 5 of my testers onto their phones.
1 of them reported that the app is crashing, but I can’t seem to reproduce it.
He also can’t seem to reproduce it either.
Is there way to get the stack trace of an iOS device that running your app?
Is there away that he can sent his logs to me via email or some kind of cloud service like Firebase?
Should I look into any technology?
If you get the person to bring their phone to you, you can plug it in to XCode and read the logs that way, however, you won't be able to go back and view logs from days past. But, if they plug in and run the app and are able to recreate the crash, then you'll have it right there.
It is possible to write code in your app to write log data to a file that you save on your phone. To keep from filling up your phone storage, I delete that file when the app is closed and create it new when the app is started. Then, I created a method in the app to contact support, and I attach the log file to the e-mail. This works great as long as they click the contact support button before closing out of the app. However, if the app crashes, then you could code it to keep the log file if it already exists on the next startup.
Keep in mind that once you start sending the log data to a file, it will no longer show up in your console when you are debugging your app, unless you code some sort of easy switch to flip to turn that feature on or off.
I have an application which is producing an error very intermittently, I am trying to run it down with an NSLog statement in swift. However, after I have noticed the bug has occured, when I hook up my iPhone to review the logs in the Devices window. I only see about 5 minutes worth of statements from various applications. Is there a way to get the history past what automatically comes up? Is there a way to get your applications NSLog statements only?
I haven't tried it from Swift, but we sometimes use NSLogger from Obj-C. It will log to a local Mac application instead of the console on the device. Alternatively, we sometimes log to a file and then transfer the file via email.
You can take a look at Bugfender, it's a product we have built to solve this problem. We had the same problem, especially when delivering beta apps to our customers, so we decided to make a product to solve this problem.
With Bugfender you will be able to get the device logs without any need to connect the device to your computer.
It's easy to integrate and you can choose which devices you want to get the logs from. Our service works offline and online, we have spent a lot of time to make it reliable and easy to use.
So I'm trying to make an application using the DJI SDK. In order for my app to function properly, my iDevice needs to be hooked up to the remote controller of the drone via USB.
This means I can't also run the app via xcode and get console output.
Is there a way of saving console output when using an app on your phone? I am aware of the crash logs, but sadly they don't provide enough info to be useful to me.
This problem started when I got a runtime error only when the device was connected to the remote controller. Therefore there was no way of isolating the problem since I couldn't tell what went wrong.
Another solution would maybe be a 1 female to 2 male usb chord, but I haven't found one online yet and even if I did I don't know if that would work.
Is there a standard way of debugging when using hardware that needs to be connected to the device?
from Xcode, hit window on the tool bar at the top, then Devices. Select the device you want to read the log from. However, this is the log for the entire phone, and you have to be plugged into the mac... so you'll have to run your tests, unplug from the DJI, plug into the mac, go to devices, and scroll through the log until you find the output from your app, and you won't be able to see real time expected outcome.
It's not ideal, but that's the only way I know of to see the apart from building an entire console log into your app yourself.
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.