Skip to content

Pass launchOptions via RCCManager #58

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions example/ios/ControllersExample/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
[[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation];

[[RCCManager sharedIntance] initBridgeWithBundleURL:jsCodeLocation
launchOptions:launchOptions];


return YES;
}

Expand Down
2 changes: 1 addition & 1 deletion ios/RCCManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
+ (instancetype)sharedInstance;
+ (instancetype)sharedIntance;

-(void)initBridgeWithBundleURL:(NSURL *)bundleURL;
-(void)initBridgeWithBundleURL:(NSURL *)bundleURL launchOptions:(NSDictionary *)launchOptions;
-(RCTBridge*)getBridge;
-(UIWindow*)getAppWindow;

Expand Down
6 changes: 3 additions & 3 deletions ios/RCCManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ -(id)getControllerWithId:(NSString*)componentId componentType:(NSString*)compone
return component;
}

-(void)initBridgeWithBundleURL:(NSURL *)bundleURL
-(void)initBridgeWithBundleURL:(NSURL *)bundleURL launchOptions:(NSDictionary *)launchOptions
{
if (self.sharedBridge) return;

self.bundleURL = bundleURL;
self.sharedBridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:nil];
self.sharedBridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];

[self showSplashScreen];
}

Expand Down