2

The script in the Run Script section:
Shell:

${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run

Input Files:

$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)  
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME} 

In AppDelegate.m

#if defined CRASHLYTICS
    [FIRApp configure];
    [[FIRCrashlytics crashlytics] setCrashlyticsCollectionEnabled: YES];
    [FIRCrashlytics initialize];
    
#ifdef DEBUG
    NSLog(@"Firebase version : %ld", (long)[FIRCrashlytics version]);
    @[][1]; /* TEST BUG*/
#endif
#endif

Add Package source in target Package added automatically

Backoffice FireBase waiting for the bug, but nothing happens:

Backoffice with no reaction

EDIT: I added this lines to the script (where it is nowhere in the documentation...) in this ticket:

   "${BUILD_DIR%Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run" -gsp "${PROJECT_DIR}/GoogleService-Info/[Target name]/GoogleService-Info.plist" -p ios

Here is the console message after launching:

    2022-06-09 14:54:47.055089+0200 xxxx[63409:6694411] [Firebase/Crashlytics] Version 9.1.0
    2022-06-09 14:54:47.055611+0200 xxxx[63409:6694604] 9.1.0 - [FirebaseCrashlytics][I-CLS000000] [Crashlytics] Running on iPhone10,1, 14.4.0 (18D52)
    2022-06-09 14:54:47.057125+0200 xxxx[63409:6694600] 9.1.0 - [FirebaseCrashlytics][I-CLS000000] [Crashlytics:Settings] No settings were cached
    2022-06-09 14:54:47.060628+0200 xxxx[63409:6694600] 9.1.0 - [FirebaseCrashlytics][I-CLS000000] Automatic data collection is disabled. Deleting 1 unsent reports over the limit of 4 to prevent disk space from filling up. To take action on these reports, call send/deleteUnsentReports. To turn on automatic data collection, call setCrashlyticsCollectionEnabled with true
    2022-06-09 14:54:47.061129+0200 xxxx[63409:6694600] 9.1.0 - [FirebaseCrashlytics][I-CLS000000] Root: /var/mobile/Containers/Data/Application/62D8E525-6537-4A4E-8501-A5151BC0653A/Library/Caches/com.crashlytics.data/com.NewTelApps.FormboxRenaultExtensionDays
    2022-06-09 14:54:47.061474+0200 xxxx[63409:6694600] 9.1.0 - [FirebaseCrashlytics][I-CLS000000] [Crashlytics:Crash] Last launch failed: this may indicate a crash shortly after app launch.
    2022-06-09 14:54:47.070326+0200 xxxx[63409:6694605] 9.1.0 - [FirebaseCrashlytics][I-CLS000000] [Crashlytics:Crash:Reports:Event] Registered Firebase Analytics event listener to receive breadcrumb logs
    2022-06-09 14:54:47.070383+0200 xxxx[63409:6694605] 9.1.0 - [FirebaseCrashlytics][I-CLS000000] Automatic data collection is enabled.
    2022-06-09 14:54:47.070474+0200 xxxx[63409:6694605] 9.1.0 - [FirebaseCrashlytics][I-CLS000000] Unsent reports will be uploaded at startup
ΩlostA
  • 2,501
  • 5
  • 27
  • 63

2 Answers2

2

you need to be in the application, at least the first view. (so after application:didFinishLaunchingWithOptions for ex

dt dino
  • 1,194
  • 6
  • 19
  • Oh yes thank you. I had to be in the first view, as I was putting the crash in the didFnishLaunchingWithOptions – ΩlostA Jun 09 '22 at 13:28
1

In iOS, if you simulated a crash then need to open the application again to get a report at first it may take up to an hour to get the bug, Only if a crash is happened then the crashlytics report page will be visible until it will be the same

Dark_Clouds_369
  • 658
  • 1
  • 6
  • 24
  • 1
    I already did it on monday, I still have no error message, and no error mail. I really don't understand what is happening here... – ΩlostA Jun 09 '22 at 10:38
  • refer --> to simulate a crash , https://firebase.google.com/docs/crashlytics/test-implementation?platform=ios#objective-c – Dark_Clouds_369 Jun 09 '22 at 10:55
  • 1
    I already check the documentation, but nothing helps. I check that ticket https://stackoverflow.com/a/65499921/3581620 that help me to progress, but still not working. I edited my ticket if you wanna check the console messages – ΩlostA Jun 09 '22 at 13:06