Support Tools Integration for iOS

To be able to debug support tickets effortlessly, all you have to do is extract the session URL from Instabug and send it as a custom attribute to your preferred support tools. This enables your support team to view Session Replays for every reported issue to help in debugging the issue. You can use the below API to extract the session URL

if let sessionLink = SessionReplay.sessionReplayLink {
  print("result: \(sessionLink)")
}
NSString *sessionLink = IBGSessionReplay.sessionReplayLink;
if (sessionLink != NULL) {
    NSLog(@"sessionLink: %@", sessionLink);
}

Zendesk Example

To automatically attach the session URL to every support ticket submitted through Zendesk, just insert the following snippet into your application's code.

Send Session URL as tags:

let request = ZDKCreateRequest()
        request.subject = "Session replay"
        request.requestDescription = "Adding session replay url"

        let instabugSessionReplayLink = SessionReplay.sessionReplayLink

        request.tags = [instabugSessionReplayLink]

Send Session URL as custom fields:

let request = ZDKCreateRequest()
        request.subject = "Session replay"
        request.requestDescription = "Adding session replay url"

        let instabugSessionReplayLink = SessionReplay.sessionReplayLink
        let field = CustomField(fieldId: 1234, value: instabugSessionReplayLink)

        request.customFields = [field]

Intercom Example

To automatically include the Session URL with each support ticket received via Intercom, simply integrate the following code snippet into your application. This will send the session URL to the recent events section.

guard let sessionURL = SessionReplay.sessionReplayLink else { return }
        Intercom.logEvent(withName: "session-replay-url", metaData: ["url": sessionURL])
        
        Intercom.present()