Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit e0ac3a4

Browse files
committed
Reverting loadBundle change to submit in a second PR
1 parent c34ee95 commit e0ac3a4

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

CodePush.m

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,16 @@ - (BOOL)isFailedHash:(NSString*)packageHash {
5252

5353
- (void)loadBundle
5454
{
55-
// Reset the runtime's bundle to be
56-
// the latest URL, and then force a refresh
57-
_bridge.bundleURL = [CodePush getBundleUrl];
58-
[_bridge reload];
55+
dispatch_async(dispatch_get_main_queue(), ^{
56+
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:[CodePush getBundleUrl]
57+
moduleName:[CodePushConfig getRootComponent]
58+
initialProperties:nil
59+
launchOptions:nil];
60+
61+
UIViewController *rootViewController = [[UIViewController alloc] init];
62+
rootViewController.view = rootView;
63+
[UIApplication sharedApplication].delegate.window.rootViewController = rootViewController;
64+
});
5965
}
6066

6167
- (void)rollbackPackage

0 commit comments

Comments
 (0)