2016-04-12 12:31:05 -06:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import "AppDelegate.h"
|
|
|
|
|
2017-01-11 05:43:43 -07:00
|
|
|
#import <React/RCTBundleURLProvider.h>
|
|
|
|
#import <React/RCTRootView.h>
|
2016-04-12 12:31:05 -06:00
|
|
|
|
|
|
|
@implementation AppDelegate
|
|
|
|
|
|
|
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
|
|
{
|
|
|
|
NSURL *jsCodeLocation;
|
|
|
|
|
2016-09-19 18:46:15 -06:00
|
|
|
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
|
2016-04-12 12:31:05 -06:00
|
|
|
|
|
|
|
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
|
|
|
moduleName:@"VideoPlayer"
|
|
|
|
initialProperties:nil
|
|
|
|
launchOptions:launchOptions];
|
2016-09-19 18:46:15 -06:00
|
|
|
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
|
2016-04-12 12:31:05 -06:00
|
|
|
|
|
|
|
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
|
|
|
UIViewController *rootViewController = [UIViewController new];
|
|
|
|
rootViewController.view = rootView;
|
|
|
|
self.window.rootViewController = rootViewController;
|
|
|
|
[self.window makeKeyAndVisible];
|
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|