Skip to content

Commit e6ecefb

Browse files
committed
Add directive to support blocking of BootSplash
1 parent 76bc375 commit e6ecefb

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

ios/NewExpensify/RCTBootSplash.mm

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#import "RCTBootSplash.h"
22

3+
#if __has_include("DeviceIntegrityChecks.h")
4+
#import "DeviceIntegrityChecks.h"
5+
#define DIC_SHOULD_BLOCK_SPLASH dic_should_block_splash()
6+
#else
7+
#define DIC_SHOULD_BLOCK_SPLASH false
8+
#endif
9+
310
#import <React/RCTUtils.h>
411

512
#import <React/RCTSurfaceHostingProxyRootView.h>
@@ -158,6 +165,10 @@ + (void)bringSubviewToFrontIfInitialized {
158165
}
159166

160167
+ (void)hide:(BOOL)fade {
168+
if (DIC_SHOULD_BLOCK_SPLASH) {
169+
return;
170+
}
171+
161172
if (![RCTBootSplash isLoadingViewVisible] || RCTRunningInAppExtension())
162173
return [RCTBootSplash clearResolveQueue];
163174

@@ -178,6 +189,10 @@ - (void)hideImpl:(BOOL)fade
178189

179190
RCT_EXPORT_METHOD(hide:(RCTPromiseResolveBlock)resolve
180191
reject:(RCTPromiseRejectBlock)reject) {
192+
if (DIC_SHOULD_BLOCK_SPLASH) {
193+
return;
194+
}
195+
181196
[self hideImpl:0 resolve:resolve];
182197
}
183198

0 commit comments

Comments
 (0)