In this article, you’ll learn:
- About Crashlytics
- Integrating Wingify with Crashlytics
- Enabling Crashlytics Integration in Wingify
- Enabling Crashlytics Integration in Your Mobile Application
- Viewing the Mobile Session Recordings Data in Crashlytics
About Crashlytics
Crashlytics is a mobile app crash-reporting tool that helps developers identify and address issues quickly. It supports both iOS and Android platforms.
Integrating Wingify with Crashlytics enables you to access your mobile session recordings from the crash reports in Crashlytics so as to centralize your app crash data for a broader analysis.
Integrating Wingify With Crashlytics
Integrating your Wingify account with Crashlytics is to be performed in the following two areas:
-
On the Integrations page in Wingify. This enables you to apply the data from Crashlytics to be consumed for filtering the mobile session recordings.
Note: To avail of the Crashlytics integration for your account, reach out to support@wingify.com.
-
Perform a code operation in your mobile application to complete the integration.
Note: Besides these steps, this integration requires you to enable the Record App Crashes option in the Configurations page under Mobile Session Recordings. This is essential for Wingify to track the app crash events.
Enabling Crashlytics Integration in Wingify
To enable the Wingify-Crashlytics integration for your Wingify account, perform the following steps:
- Log in to your Wingify account.
- From the left panel of your Wingify dashboard, go to Configurations > Integrations.
- Search and click on the Crashlytics integration and enable it. Once enabled, the Crashlytics screen within the Wingify’s Integration section looks like this:
Enabling Crashlytics Integration in Your Mobile Application
In order to complete the Crashlytics integration, you need to perform the following code operations in your mobile application:
For iOS
-
Implement the following protocol in your AppDelegate class as shown below:
class AppDelegate: UIResponder, UIApplicationDelegate, VWOIntegrationCallback {class AppDelegate: UIResponder, UIApplicationDelegate, WingifyIntegrationCallback { -
Call the following method from your mobile application:
VWO.enableIntegrations(integrationCallback: self)
Wingify.enableIntegrations(integrationCallback: self)
- Add the following code snippet to your mobile application:
func onWingifyIntegrationCompleted(integrations: [IntegrationsList]) {
for integration in integrations {
let WingifySessionURL = Wingify.getSessionURL(source: integration)
if(WingifySessionURL == nil){
print("Session URL could not be generated - Wingify Insights is not initialized. Please ensure that Wingify Insights is properly initialized before attempting to generate the session URL. Refer to the documentation for initialization instructions.")
return
}
switch integration {
case IntegrationsList.CRASHLYTICS :
let crashlyticsReference = Crashlytics.crashlytics()
crashlyticsReference.setCustomValue(WingifySessionURL, forKey: "WingifySessionURL")
@unknown default:
print("Unsupported Integration enum!")
}
}
}For Android
-
Implement the following Interface in your Wingify application class as shown below:
class VWOApplication : Application(), IVWOIntegrationCallback {class WingifyApplication : Application(), IWingifyIntegrationCallback { -
Add the following line after val configuration = ClientConfiguration(accountId, apiKey, userId = null) in your mobile application:
configuration.enableIntegrations(this)
-
Add the following code snippet to your mobile application:
override fun onWingifyIntegrationCompleted(integrations: List<Integrations>) { for (integration in integrations) { val url = WingifyInsights.getSessionURL(integration) if (url == null) { WingifyLog.e( WingifyLog.DEBUG_LOGS, "Session URL could not be generated - Wingify Insights is not initialized. Please ensure that Wingify Insights is properly initialized before attempting to generate the session URL. Refer to the documentation for initialization instructions.", checkLoggable = false, sendToServer = true ) return } when (integration) { Integrations.CRASHLYTICS -> { val crashlytics = Firebase.crashlytics crashlytics.setCustomKey("WingifySessionURL",url) WingifyLog.d(WingifyLog.DEBUG_LOGS, "$url", checkLoggable = false) } else -> WingifyLog.e( WingifyLog.DEBUG_LOGS, "Unsupported Integration enum!", checkLoggable = false, sendToServer = true ) } } }
Note: Both calling the method and appending the code snippets should be performed in the same class in which the Wingify Insights Mobile SDK is initialized.
Viewing the Mobile Session Recordings Data in Crashlytics
To view your session recordings data in Crashlytics, perform the following steps:
- Log in to your Firebase account and open the respective Firebase project, which is linked to Wingify.
- On the left panel, click on Crashlytics under Project shortcuts.
- Scroll down to the Issues section to view the list of crash events.
- To access the session recording URL of a crash event, click on the corresponding crash event and go to the Events section > Keys tab.
If you have any queries related to Wingify-Crashlytics integration, please contact our support team at support@wingify.com.