WingifyGuides

Integrate Wingify with Crashlytics

This article covers the following: * Overview * Integrate Wingify with Crashlytics * Enable Crashlytics Integration in Wingify * Enable Crashlytics Integration in Your Mobile Application * View the Mobile Session Recordings Data in Crashlytics

#Overview

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.

#Integrate Wingify with Crashlytics

Integrating your Wingify account with Crashlytics is to be performed in the following two areas:

  1. 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, contact Wingify Support.

  2. 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.

#Enable Crashlytics Integration in Wingify

To enable the Wingify-Crashlytics integration for your Wingify account, perform the following steps:

  1. Log in to your Wingify account.
  2. From the left panel of your Wingify dashboard, go to Configurations > Integrations.
  3. Search and click on the Crashlytics integration and enable it. Once enabled, the Crashlytics screen within the Wingify’s Integration section looks like this:

#Enable Crashlytics Integration in Your Mobile Application

To complete the Crashlytics integration, you need to perform the following code operations in your mobile application:

#For iOS

  1. Implement the following protocol in your AppDelegate class as shown below:

    • Accounts created before June 14, 2026
    • Accounts created on/after June 14, 2026
    class AppDelegate: UIResponder, UIApplicationDelegate, VWOIntegrationCallback {
    
    class AppDelegate: UIResponder, UIApplicationDelegate, WingifyIntegrationCallback {
    
  2. Call the following method from your mobile application:

    • Accounts created before June 14, 2026
    • Accounts created on/after June 14, 2026
    VWO.enableIntegrations(integrationCallback: self)
    
    Wingify.enableIntegrations(integrationCallback: self)
    
  3. Add the following code snippet to your mobile application:

    • Accounts created before June 14, 2026
    • Accounts created on/after June 14, 2026
    func onVWOIntegrationCompleted(integrations: [IntegrationsList]) {
               for integration in integrations {
                   let VWOSessionURL = VWO.getSessionURL(source: integration)
                   if(VWOSessionURL == nil){
                       print("Session URL could not be generated - VWO Insights is not initialized. Please ensure that VWO 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(VWOSessionURL, forKey: "VWOSessionURL")
                       @unknown default:
                           print("Unsupported Integration enum!")
                   }
               }
           }
    
    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

  1. Implement the following Interface in your Wingify application class as shown below:

    • Accounts created before June 14, 2026
    • Accounts created on/after June 14, 2026
    class VWOApplication : Application(), IVWOIntegrationCallback {
    
    class WingifyApplication : Application(), IWingifyIntegrationCallback {
    
  2. Add the following line after val configuration = ClientConfiguration(accountId, apiKey, userId = null) in your mobile application:

    configuration.enableIntegrations(this)
    
  3. Add the following code snippet to your mobile application:

    • Accounts created before June 14, 2026
    • Accounts created on/after June 14, 2026
    override fun onVWOIntegrationCompleted(integrations: List<Integrations>) {
           for (integration in integrations) {
               val url = VWOInsights.getSessionURL(integration)
               if (url == null) {
                   VWOLog.e(
                       VWOLog.DEBUG_LOGS,
                       "Session URL could not be generated - VWO Insights is not initialized. Please ensure that VWO 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("VWOSessionURL",url)
                       VWOLog.d(VWOLog.DEBUG_LOGS, "$url", checkLoggable = false)
                   }
                   else -> VWOLog.e(
                       VWOLog.DEBUG_LOGS,
                       "Unsupported Integration enum!",
                       checkLoggable = false,
                       sendToServer = true
                   )
               }
           }
       }
    
    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 Behavior Analytics Mobile SDK is initialized.

#View the Mobile Session Recordings Data in Crashlytics

To view your session recordings data in Crashlytics, perform the following steps:

  1. Log in to your Firebase account and open the respective Firebase project, which is linked to Wingify.

  1. On the left panel, click on Crashlytics under Project shortcuts.
  2. Scroll down to the Issues section to view the list of crash events.

  1. To access the session recording URL of a crash event, click on the corresponding crash event and go to the Events section > Keys tab.

#Need more help?

For further assistance or more information, contact Wingify Support.