From 1042e3f7b5d7ee30a727a3cd9e90945a1f6daed5 Mon Sep 17 00:00:00 2001 From: Gabriel Lanata Date: Mon, 2 Aug 2021 21:30:05 -0700 Subject: [PATCH] Remove check (#29) --- Sources/Hammer/EventGenerator/EventGenerator.swift | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Sources/Hammer/EventGenerator/EventGenerator.swift b/Sources/Hammer/EventGenerator/EventGenerator.swift index a489a83..bf15c30 100644 --- a/Sources/Hammer/EventGenerator/EventGenerator.swift +++ b/Sources/Hammer/EventGenerator/EventGenerator.swift @@ -162,12 +162,7 @@ public final class EventGenerator { throw HammerError.unableToAccessPrivateApi(type: "UIApplication", method: "Protocol") } - let contextID = window.contextId - guard contextID != 0 else { - throw HammerError.unableToAccessPrivateApi(type: "UIWindow", method: "ContextID") - } - - BackBoardServices.shared.eventSetDigitizerInfo(event, contextID, false, false, nil, 0, 0) + BackBoardServices.shared.eventSetDigitizerInfo(event, window.contextId, false, false, nil, 0, 0) app.enqueue(event)