Add tap/click event. Improve Swift/ObjC bridging.

This commit is contained in:
Doug
2021-12-08 12:49:57 +00:00
parent 6001c9f0f5
commit 02744b7577
10 changed files with 89 additions and 91 deletions
+9
View File
@@ -148,6 +148,15 @@ extension Analytics {
client.screen(event)
}
/// Track an element that has been tapped
/// - Parameters:
/// - tap: The element that was tapped
/// - index: The index of the element, if it's in a list of elements
func trackTap(_ tap: AnalyticsElement, index: Int?) {
let event = AnalyticsEvent.Click(index: index, name: tap.elementName)
client.capture(event)
}
/// Track an E2EE error that occurred
/// - Parameters:
/// - reason: The error that occurred.