diff --git a/Sources/Amplitude/Plugins/iOS/UIKitElementInteractions.swift b/Sources/Amplitude/Plugins/iOS/UIKitElementInteractions.swift index 38e6280..69e8a2a 100644 --- a/Sources/Amplitude/Plugins/iOS/UIKitElementInteractions.swift +++ b/Sources/Amplitude/Plugins/iOS/UIKitElementInteractions.swift @@ -125,17 +125,26 @@ extension UIGestureRecognizer { return } - let gestureAction: String? = switch self { - case is UITapGestureRecognizer: "tap" - case is UISwipeGestureRecognizer: "swipe" - case is UIPanGestureRecognizer: "pan" - case is UILongPressGestureRecognizer: "longPress" + let gestureAction: String? + switch self { + case is UITapGestureRecognizer: + gestureAction = "tap" + case is UISwipeGestureRecognizer: + gestureAction = "swipe" + case is UIPanGestureRecognizer: + gestureAction = "pan" + case is UILongPressGestureRecognizer: + gestureAction = "longPress" #if !os(tvOS) - case is UIPinchGestureRecognizer: "pinch" - case is UIRotationGestureRecognizer: "rotation" - case is UIScreenEdgePanGestureRecognizer: "screenEdgePan" + case is UIPinchGestureRecognizer: + gestureAction = "pinch" + case is UIRotationGestureRecognizer: + gestureAction = "rotation" + case is UIScreenEdgePanGestureRecognizer: + gestureAction = "screenEdgePan" #endif - default: nil + default: + gestureAction = nil } guard let gestureAction else { return } diff --git a/Tests/AmplitudeTests/Amplitude+Extensions.swift b/Tests/AmplitudeTests/Amplitude+Extensions.swift index 1349ff5..1507dc7 100644 --- a/Tests/AmplitudeTests/Amplitude+Extensions.swift +++ b/Tests/AmplitudeTests/Amplitude+Extensions.swift @@ -18,6 +18,6 @@ extension Amplitude { waitForQueueExpectation.fulfill() } - XCTWaiter().wait(for: [waitForQueueExpectation]) + XCTWaiter().wait(for: [waitForQueueExpectation], timeout: 10) } }