2021-02-19 08:07:53 -07:00
|
|
|
/**
|
2021-06-01 05:07:57 -06:00
|
|
|
* Copyright (c) mrousavy
|
2021-02-19 08:07:53 -07:00
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import "AppDelegate.h"
|
2021-02-19 10:02:24 -07:00
|
|
|
#import <ReactNativeNavigation/ReactNativeNavigation.h>
|
2021-02-19 08:07:53 -07:00
|
|
|
|
|
|
|
#import <React/RCTBridge.h>
|
|
|
|
#import <React/RCTBundleURLProvider.h>
|
|
|
|
|
|
|
|
@implementation AppDelegate
|
|
|
|
|
|
|
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
|
|
{
|
2021-06-03 06:16:02 -06:00
|
|
|
RCTBridge* bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
|
|
|
[ReactNativeNavigation bootstrapWithBridge:bridge];
|
2021-02-19 08:07:53 -07:00
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
2021-02-19 10:02:24 -07:00
|
|
|
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge {
|
|
|
|
return [ReactNativeNavigation extraModulesForBridge:bridge];
|
|
|
|
}
|
|
|
|
|
2021-02-19 08:07:53 -07:00
|
|
|
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
|
|
|
{
|
|
|
|
#if DEBUG
|
|
|
|
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
|
|
|
#else
|
|
|
|
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|