File tree 1 file changed +21
-1
lines changed
AppFramework/AutomationSetup
1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 15
15
//
16
16
17
17
#import " GREYAutomationSetup.h"
18
+ #import < Foundation/Foundation.h>
18
19
19
20
#import " GREYAppleInternals.h"
20
21
@@ -24,7 +25,26 @@ @implementation GREYAutomationSetup
24
25
25
26
+ (void )load {
26
27
// Force software keyboard.
27
- [[UIKeyboardImpl sharedInstance ] setAutomaticMinimizationEnabled: NO ];
28
+ static NSArray <NSString *> *legacyTargets;
29
+ static dispatch_once_t onceToken;
30
+ dispatch_once (&onceToken, ^{
31
+ legacyTargets = @[
32
+ ];
33
+ });
34
+ BOOL deferKeyboardChange = YES ;
35
+ NSString *packagePath = NSProcessInfo .processInfo .environment [@" TEST_UNDECLARED_OUTPUTS_DIR" ];
36
+ for (NSString *legacyTarget in legacyTargets) {
37
+ if ([packagePath containsString: legacyTarget]) {
38
+ deferKeyboardChange = NO ;
39
+ }
40
+ }
41
+ if (deferKeyboardChange) {
42
+ dispatch_async (dispatch_get_main_queue (), ^{
43
+ [[UIKeyboardImpl sharedInstance ] setAutomaticMinimizationEnabled: NO ];
44
+ });
45
+ } else {
46
+ [[UIKeyboardImpl sharedInstance ] setAutomaticMinimizationEnabled: NO ];
47
+ }
28
48
}
29
49
30
50
@end
You can’t perform that action at this time.
0 commit comments