Reputation: 4479
I'd like to access the crash log in iPhone app without Third Party library. Do you know where the crash log is saved in iPhone app?
I know the iPhone app folder structure is as followed:
Documents/
Library/
Preferences/
MyApp.app/
Default.png
icon.png
Info.plist
tmp/
EDIT:
If the crashes are not stored in Application folder,
do you know how UKCrashReporter and other third party library do that?
Upvotes: 0
Views: 2265
Reputation: 1
Although this is a very old question, I want to add that, apart from
/private/var/mobile/Library/Logs/CrashReporter/
iOS also stores crash logs in
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.osanalytics/DiagnosticReports/
and it's where iOS's Settings app finds and shows logs in Analytics Data.
Upvotes: 0
Reputation: 2049
I have a jailbroken iOS device, so I can answer the first part of your question easily (although you may have already done so yourself). The standard crash logs are stored on the device in the following folder:
/private/var/mobile/Library/Logs/CrashReporter/
If you don't have a jailbroken device and the logs aren't visible in Xcode, you should be able to access the files with a iOS file explorer like i-FunBox, which should be able to access the file system even without jailbreak.
As for the second part of your question, I would think that at least some third party crash reporters save the crash data in the app's folder itself, judging by the following directories (which were empty as the app has not yet crashed on my device):
// ... was the identifier for the app path, removed for readability
/private/var/mobile/Applications/.../Library/Caches/com.plausiblelabs.crashreporter.data
/private/var/mobile/Applications/.../Library/Caches/com.plausiblelabs.crashreporter.data/SkobblerUS
/private/var/mobile/Applications/.../Library/Caches/com.plausiblelabs.crashreporter.data/SkobblerUS/queued_reports
/private/var/mobile/Applications/.../Library/Caches/crashes
Again this is something you could verify with an iOS file browser.
Upvotes: 1
Reputation: 1691
You need to be connected to iPhone device and Select Window -> Organizer -> Device Logs.
Upvotes: 2