File tree Expand file tree Collapse file tree
AppFramework/AutomationSetup Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515//
1616
1717#import " GREYAutomationSetup.h"
18+ #import < Foundation/Foundation.h>
1819
1920#import " GREYAppleInternals.h"
2021
@@ -24,7 +25,26 @@ @implementation GREYAutomationSetup
2425
2526+ (void )load {
2627 // 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+ }
2848}
2949
3050@end
You can’t perform that action at this time.
0 commit comments