code-8
code-8

Reputation: 58662

Is there way to get the stack trace of an iOS device that running your app?

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?

Upvotes: 0

Views: 1441

Answers (1)

Michael Dougan
Michael Dougan

Reputation: 1698

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.

Upvotes: 1

Related Questions