May 11, 2020 Replies: 22 This is a wrapper of Firebase Crashlytics library for B4i. I made this for @Jack Cole and he gave me permission to post this in forum to help other users. iFirebaseCrashlytics Author: @Biswajit Version: 2 Crashlytics Events: HasUnsentReports Functions: checkForUnsentReports Check for unsent reports You must set setCrashlyticsCollectionEnabled to false in order to use hasUnsentReports If there is any unsent report the EventName_HasUnsentReports event will be raised deleteUnsentReports Delete unsent reports didCrashDuringPreviousExecution As Boolean Detect when a crash happens during your app's last run. Initialize (EventName As String) Turn off automatic collection by adding a new key to your project #PlistExtra: <key>FirebaseCrashlyticsCollectionEnabled</key><false/> Initializes the library inside the Application_Start function. You should initialize FirebaseAnalytics before initializing this library. isCrashlyticsCollectionEnabled As Boolean Check if automatically report collection is enabled or not Log (msg As String) Add custom log messages NOTE: To avoid slowing down your app, Crashlytics limits logs to 64kB and deletes older log entries when a session's logs go over that limit. sendUnsentReports Send unsent reports setCrashlyticsCollectionEnabled (enable As Boolean) Enable collection for select users by calling the Crashlytics data collection override at runtime. The override value persists across launches of your app so Crashlytics can automatically collect reports. To opt out of automatic crash reporting, pass false as the override value. When set to false, the new value does not apply until the next run of the app SetUserID (ID As String) Set user identifiers TestCrash Cause a Test Crash Installation: Download the latest libraries from here. Download the attached Zip file. Copy the .a and .h file to the local build server's Libs folder. Then copy the XML file to the B4i library folder. Copy the upload-symbols file to FirebaseCrashlytics.framework folder of your local build server. Usage: Follow firebase integration tutorial from here, After initializing the firebase analytic library initialize this crashlytics library. You have to build the project in Release Mode. Otherwise, the builder will not generate the dSYM which is needed for the library to work. Enable opt-in reporting B4X: Copy #PlistExtra: <key>FirebaseCrashlyticsCollectionEnabled</key><false/> After building the project (Not possible from hosted builder): Don't run the app after building. Open Terminal App. Type, cd /path/to/your/project/directory In my case, it is /Volumes/ExtendedSSD/B4iBuildServer/UploadedProjects/a888heh Paste this following code to upload dSYM file to google server and hit enter, ../../Libs/FirebaseCrashlytics.framework/upload-symbols -gsp ./GoogleService-Info.plist -p ios ./Payload Now run the app. For testing the crash call FirebaseCrashlytics.TestCrash. It may take few minutes to reflect on the firebase dashboard Update 1.01: Added simulator support. Update 2.0: Based on the new SDK. Added option to check if any crash happens during the last run. Added option to check if there are any unsent crash reports. Added option to manually send unsent crash reports. Added option to delete unsent crash reports. Added option to check if automatic report collection is enabled or not Added option to toggle automatic report collection Added option to send custom log to crashlytics Attachments iFirebaseCrashlytics.zip iFirebaseCrashlytics.zip 122.5 KB · Views: 36 Last edited: Oct 15, 2020 Click to expand...
This is a wrapper of Firebase Crashlytics library for B4i. I made this for @Jack Cole and he gave me permission to post this in forum to help other users. iFirebaseCrashlytics Author: @Biswajit Version: 2 Crashlytics Events: HasUnsentReports Functions: checkForUnsentReports Check for unsent reports You must set setCrashlyticsCollectionEnabled to false in order to use hasUnsentReports If there is any unsent report the EventName_HasUnsentReports event will be raised deleteUnsentReports Delete unsent reports didCrashDuringPreviousExecution As Boolean Detect when a crash happens during your app's last run. Initialize (EventName As String) Turn off automatic collection by adding a new key to your project #PlistExtra: <key>FirebaseCrashlyticsCollectionEnabled</key><false/> Initializes the library inside the Application_Start function. You should initialize FirebaseAnalytics before initializing this library. isCrashlyticsCollectionEnabled As Boolean Check if automatically report collection is enabled or not Log (msg As String) Add custom log messages NOTE: To avoid slowing down your app, Crashlytics limits logs to 64kB and deletes older log entries when a session's logs go over that limit. sendUnsentReports Send unsent reports setCrashlyticsCollectionEnabled (enable As Boolean) Enable collection for select users by calling the Crashlytics data collection override at runtime. The override value persists across launches of your app so Crashlytics can automatically collect reports. To opt out of automatic crash reporting, pass false as the override value. When set to false, the new value does not apply until the next run of the app SetUserID (ID As String) Set user identifiers TestCrash Cause a Test Crash Installation: Download the latest libraries from here. Download the attached Zip file. Copy the .a and .h file to the local build server's Libs folder. Then copy the XML file to the B4i library folder. Copy the upload-symbols file to FirebaseCrashlytics.framework folder of your local build server. Usage: Follow firebase integration tutorial from here, After initializing the firebase analytic library initialize this crashlytics library. You have to build the project in Release Mode. Otherwise, the builder will not generate the dSYM which is needed for the library to work. Enable opt-in reporting B4X: Copy #PlistExtra: <key>FirebaseCrashlyticsCollectionEnabled</key><false/> After building the project (Not possible from hosted builder): Don't run the app after building. Open Terminal App. Type, cd /path/to/your/project/directory In my case, it is /Volumes/ExtendedSSD/B4iBuildServer/UploadedProjects/a888heh Paste this following code to upload dSYM file to google server and hit enter, ../../Libs/FirebaseCrashlytics.framework/upload-symbols -gsp ./GoogleService-Info.plist -p ios ./Payload Now run the app. For testing the crash call FirebaseCrashlytics.TestCrash. It may take few minutes to reflect on the firebase dashboard Update 1.01: Added simulator support. Update 2.0: Based on the new SDK. Added option to check if any crash happens during the last run. Added option to check if there are any unsent crash reports. Added option to manually send unsent crash reports. Added option to delete unsent crash reports. Added option to check if automatic report collection is enabled or not Added option to toggle automatic report collection Added option to send custom log to crashlytics
yiankos1 Well-Known Member Licensed User Longtime User Nov 19, 2020 #21 Hello, I try to test the updated version of this lib from hosted builder but get this error at compilation.(i just copied updated .xml file at additional libs) Thank you for your time. Attachments error.txt error.txt 21.1 KB · Views: 4
Hello, I try to test the updated version of this lib from hosted builder but get this error at compilation.(i just copied updated .xml file at additional libs) Thank you for your time.
Biswajit Active Member Licensed User Longtime User Nov 20, 2020 #22 yiankos1 said: Hello, I try to test the updated version of this lib from hosted builder but get this error at compilation.(i just copied updated .xml file at additional libs) Thank you for your time. Click to expand... Code: Copy no visible @interface for 'iFirebaseCrashlytics' declares the selector 'sendUnsentReports' As per the error, it seems that the hosted builder has old crashlytics wrapper. @Erel could you please upload the latest one?
yiankos1 said: Hello, I try to test the updated version of this lib from hosted builder but get this error at compilation.(i just copied updated .xml file at additional libs) Thank you for your time. Click to expand... Code: Copy no visible @interface for 'iFirebaseCrashlytics' declares the selector 'sendUnsentReports' As per the error, it seems that the hosted builder has old crashlytics wrapper. @Erel could you please upload the latest one?