From cebd1b9df1bf7d1463458a3b3c36cda060eba6d2 Mon Sep 17 00:00:00 2001 From: Leo Natan Date: Thu, 24 May 2018 12:32:05 +0300 Subject: [PATCH] Add support for disabling touch indicators through launch argument --- detox/ios/Detox/DetoxAppDelegateProxy.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/detox/ios/Detox/DetoxAppDelegateProxy.m b/detox/ios/Detox/DetoxAppDelegateProxy.m index 7a5852768c..d962759d30 100644 --- a/detox/ios/Detox/DetoxAppDelegateProxy.m +++ b/detox/ios/Detox/DetoxAppDelegateProxy.m @@ -27,6 +27,8 @@ static COSTouchVisualizerWindow* _touchVisualizerWindow; +static BOOL _disableTouchIndicator; + static NSURL* _launchUserNotificationDataURL() { NSString* userNotificationDataPath = [[NSUserDefaults standardUserDefaults] objectForKey:@"detoxUserNotificationDataURL"]; @@ -128,6 +130,8 @@ + (void)load _pendingOpenURLs = [NSMutableArray new]; _pendingUserNotificationDispatchers = [NSMutableArray new]; + _disableTouchIndicator = [NSUserDefaults.standardUserDefaults boolForKey:@"disableTouchIndicator"]; + NSURL* url; #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_10_3 @@ -321,7 +325,7 @@ - (void)applicationWillEnterForeground:(UIApplication *)application - (BOOL)touchVisualizerWindowShouldAlwaysShowFingertip:(COSTouchVisualizerWindow *)window { - return YES; + return _disableTouchIndicator == NO; } #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_10_3