@@ -23,6 +23,91 @@ - (void)_performBlockAfterCATransactionCommits_openswiftui_safe_wrapper:(void (^
23
23
func (self, selector, block);
24
24
}
25
25
}
26
+
27
+ - (void )startedTest_openswiftui_safe_wrapper : (NSString *)name {
28
+ typedef void (*Func)(UIApplication *, SEL , NSString *);
29
+ SEL selector = NSSelectorFromString (@" startedTest:" );
30
+ Func func = nil ;
31
+ if ([self respondsToSelector: selector]) {
32
+ IMP impl = class_getMethodImplementation ([self class ], selector);
33
+ func = (Func)impl;
34
+ }
35
+ if (func != nil ) {
36
+ func (self, selector, name);
37
+ }
38
+ }
39
+
40
+ - (void )finishedTest_openswiftui_safe_wrapper : (NSString *)name {
41
+ typedef void (*Func)(UIApplication *, SEL , NSString *);
42
+ SEL selector = NSSelectorFromString (@" finishedTest:" );
43
+ Func func = nil ;
44
+ if ([self respondsToSelector: selector]) {
45
+ IMP impl = class_getMethodImplementation ([self class ], selector);
46
+ func = (Func)impl;
47
+ }
48
+ if (func != nil ) {
49
+ func (self, selector, name);
50
+ }
51
+ }
52
+
53
+ - (void )failedTest_openswiftui_safe_wrapper : (NSString *)name withFailure : (NSError *)failure {
54
+ typedef void (*Func)(UIApplication *, SEL , NSString *, NSError *);
55
+ SEL selector = NSSelectorFromString (@" failedTest:withFailure:" );
56
+ Func func = nil ;
57
+ if ([self respondsToSelector: selector]) {
58
+ IMP impl = class_getMethodImplementation ([self class ], selector);
59
+ func = (Func)impl;
60
+ }
61
+ if (func != nil ) {
62
+ func (self, selector, name, failure);
63
+ }
64
+ }
65
+
66
+ - (NSString *)_launchTestName_openswiftui_safe_wrapper {
67
+ typedef NSString * (*Func)(UIApplication *, SEL );
68
+ SEL selector = NSSelectorFromString (@" _launchTestName" );
69
+ Func func = nil ;
70
+ if ([self respondsToSelector: selector]) {
71
+ IMP impl = class_getMethodImplementation ([self class ], selector);
72
+ func = (Func)impl;
73
+ }
74
+ if (func != nil ) {
75
+ return func (self, selector);
76
+ }
77
+ return nil ;
78
+ }
79
+ @end
80
+
81
+ @implementation UIView (OpenSwiftUI_SPI)
82
+ - (BOOL )_shouldAnimatePropertyWithKey_openswiftui_safe_wrapper : (NSString *)key {
83
+ typedef BOOL (*Func)(UIView *, SEL , NSString *);
84
+ SEL selector = NSSelectorFromString (@" _shouldAnimatePropertyWithKey:" );
85
+ Func func = nil ;
86
+ if ([self respondsToSelector: selector]) {
87
+ IMP impl = class_getMethodImplementation ([self class ], selector);
88
+ func = (Func)impl;
89
+ }
90
+ if (func != nil ) {
91
+ return func (self, selector, key);
92
+ }
93
+ return NO ;
94
+ }
95
+ @end
96
+
97
+ @implementation UIViewController (OpenSwiftUI_SPI)
98
+ - (BOOL )_canShowWhileLocked_openswiftui_safe_wrapper {
99
+ typedef BOOL (*Func)(UIViewController *, SEL );
100
+ SEL selector = NSSelectorFromString (@" _canShowWhileLocked" );
101
+ Func func = nil ;
102
+ if ([self respondsToSelector: selector]) {
103
+ IMP impl = class_getMethodImplementation ([self class ], selector);
104
+ func = (Func)impl;
105
+ }
106
+ if (func != nil ) {
107
+ return func (self, selector);
108
+ }
109
+ return NO ;
110
+ }
26
111
@end
27
112
28
113
#endif /* UIKit.h */
0 commit comments