Getting Crash Logs and Console Output without Xcode Just from the device the application which was crashed. And also using Crashlytics Fabric tool

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

This is an informational post.

Most of us are facing this issue as crash is happening in client device we are unable to replicate at developer end unable to provide information regarding the Crash.

Getting Crash Logs Directly From a Device Without Xcode:

Users can retrieve crash reports from their device and send them to you via email by following these instructions.

(It is not possible to get device console logs directly from a device)

1) Open Settings app

2) Go to Privacy, then Diagnostics & Usage

3) Select Diagnostics & Usage Data

4) Locate the log for the crashed app. The logs will be named in the format: <AppName>_<DateTime>_<DeviceName>

5) Select the desired log. Then, using the text selection UI select the entire text of the log. Once the text is selected, tap Copy (Command A Then command C)

6) Paste the copied text to Mail and send to an email address as desired

Hope this will help to send the Crash logs to your developers.

Most importantly we have Fabric (Crashlytics) tool in which we can import it into our project and when ever we get a crash that crash report will automatically goes to the user we have enrolled to send the email .

In the below link we have complete information about installation procedure, summary, sample code , sample apps.

https://fabric.io/kits/ios/crashlytics/manual-install.

Crashlytics doesn’t capture crashes if a debugger is attached at launch, so to see the crash in action you'll need to follow these steps:

  1. Run your app from Xcode to install it on the simulator or your device
  2. Press the Stop button in Xcode to quit it
  3. Launch your app from the home screen to run it without the debugger
  4. Press the “Crash” button to trigger the crash
  5. Run the app again from Xcode so it can deliver the recorded crash to Crashlytics

Within a few minutes, you should see the crash appear on your Fabric Dashboard.

Not seeing a crash in the dashboard?

  • Double-check in your Build Settings that your Debug Information Format is “DWARF with dSYM File” for both Debug andRelease
  • Make sure to launch the app after crashing it, so that the crash can be uploaded

If you don’t see the crash after a few minutes, run your app again to retry crash delivery.

Below is the code which we will initialise the Crashlytics SDK.

[Fabric with:@[[Crashlytics class]]]; in application methods didFinishLaunchingWithOptions.

This how we will enroll a user to get the report of crash:

- (void) logUser {

// TODO: Use the current user's information

// You can call any combination of these three methods

[CrashlyticsKit setUserIdentifier:@"12345"];

[CrashlyticsKit setUserEmail:@"user@fabric.io"];

[CrashlyticsKit setUserName:@"Test User"];

}

You can find all the most important stuff from the URL i have provide , very detailed information is mentioned over there.