Custom data
v1.7.0Attach your own context to every bug report.
Attach arbitrary key/value pairs to every subsequent bug report:
swift
import BugScreenSDK
// Replace the whole map:
BugScreenSDK.setCustomData([
"env": "staging",
"buildType": "debug",
"userTier": "pro",
])
// Set or remove a single key:
BugScreenSDK.setCustomData(key: "userId", value: "abc-123")
BugScreenSDK.removeCustomData(key: "userId")
// Merge a map without replacing existing keys:
BugScreenSDK.addCustomData(["plan": "pro", "region": "eu"])
// Remove all custom data:
BugScreenSDK.clearCustomData()Call any time after configure() from the main actor. The values are read when the bug report screen opens and appear in the report's metadata.