-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathAppDelegate.mm
39 lines (32 loc) · 1.1 KB
/
AppDelegate.mm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#import "AppDelegate.h"
#import "LivekitReactNative.h"
#import <React/RCTBundleURLProvider.h>
#import <WebRTC/WebRTC.h>
#import "WebRTCModule.h"
#import "WebRTCModuleOptions.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[LivekitReactNative setup];
WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
// Optional for debugging WebRTC issues.
options.loggingSeverity = RTCLoggingSeverityInfo;
self.moduleName = @"LivekitReactNativeExample";
// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
self.initialProps = @{};
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [self bundleURL];
}
- (NSURL *)bundleURL
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
@end