Search code examples
iosobjective-cfirebasefirebase-crash-reporting

The Firebase crash reporting on iOS not send the report after the crash


I have configured the Firebase Crash Reporting. When I test it with code:

assert(true);

The report was sending.

When I use the next code for the test crash the app:

NSArray *array = @[@(123),@(312)];
array[5];

The report is not sending. I'm confused(

All code adds into AppDelegate after the

[FIRApp configure];

Solution

  • I tested this scenario and it worked fine for me. let me explain it in two steps.

    Step 1:

    NSArray *array = @[@(123),@(312)];
    array[5];
    

    add the code in application:didFinishLaunchingWithOptions function and after that, build the application. It will crash for sure.

    Step 2: Stop the application and open the simulator and run the application from the simulator not from Xcode.

    Step 3:

    // NSArray *array = @[@(123),@(312)];
       // array[5];
    

    comment the code which is causing the crash and run it from the Xcode.

    if all work well then this message will be shown "Firebase Crash Reporting: Crash successfully uploaded" in the console of Xcode.

    Hope it helps. Let me know if there is any problem.