UNPKG

397 BPlain TextView Raw
1#import "Restart.h"
2
3@implementation Restart
4
5RCT_EXPORT_MODULE(RNRestart)
6
7- (void)loadBundle
8{
9 RCTTriggerReloadCommandListeners(@"react-native-restart: Restart");
10}
11
12RCT_EXPORT_METHOD(Restart) {
13 if ([NSThread isMainThread]) {
14 [self loadBundle];
15 } else {
16 dispatch_sync(dispatch_get_main_queue(), ^{
17 [self loadBundle];
18 });
19 }
20 return;
21}
22
23@end