DiagnosticSDK

Session model

Session → screen visit → requests.

A recorded session is a tree:

Session (id, start date, device, OS, app version)
└── Screen visit (UIViewController name, entered at)
    └── Request (method, URL, headers, body, status, duration)

Leaving a screen and coming back to it creates a new screen node, so the navigation order is preserved. Two consecutive visits of the same screen are merged into one.

File format

FileContent
Dx_XXXXXXX.jsonOne session, plain JSON (ISO 8601 dates, slashes not escaped). Saved to History.
IMP_<name>.jsonA file imported into History, copied as is.
Dx_XXXXXXX_S.jsonSafe Export: { "isEncrypted": true, "salt", "encryptedData" }, the session JSON encrypted with AES-GCM (base64).

The session JSON is SessionTrace → screens → networkInteractions:

ObjectFields
SessionsessionId, startedAt, metadata (appVersion, osVersion, deviceModel, isSimulator), screens
Screenid, name, enteredAt, exitedAt, networkInteractions
Interactionid, startedAt, durationMs, screenName, request, response, timing
requesturl, method, headers, bodyBase64, bodySizeBytes, bodyEncoding, isBodyTruncated, bodyOmission
responsestatus, headers, bodyBase64, bodySizeBytes, errorDescription, bodyEncoding, isBodyTruncated, bodyOmission
timingsource, networkDurationMs, appPerceivedDurationMs, phases, redirectCount, isServedFromCache, networkProtocol, isConnectionReused, responseBytesReceived, deliveringURLProtocolName
  • bodyEncoding is "text" or "base64". Despite its name, bodyBase64 holds readable text when the encoding is "text".
  • bodySizeBytes is always the real size, even when the body is truncated or not stored.
  • isBodyTruncated is written only when true (body larger than 2 MiB).
  • bodyOmission explains a missing body: "binaryContent", "notObservableForTaskType" (download and stream tasks) or "memoryBudget".
  • deliveringURLProtocolName names a third-party URLProtocol that delivered the response.
  • A response interrupted by stopping the capture has status 0 and errorDescription "Capture stopped before the response was received".
  • Files from older SDK versions have no bodyEncoding: non-JSON bodies are replaced by a can't save this type of content: … note.

On this page