vn-verdnaturachat/ios/RocketChatRN/AppDelegate.m

50 lines
1.9 KiB
Mathematica
Raw Normal View History

2017-08-03 18:23:43 +00: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-08-12 20:52:55 +00:00
// **********************************************
// *** DON'T MISS: THE NEXT LINE IS IMPORTANT ***
// **********************************************
#import "RCCManager.h"
2017-08-03 18:23:43 +00:00
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
2017-08-12 20:52:55 +00:00
// **********************************************
// *** DON'T MISS: THIS IS HOW WE BOOTSTRAP *****
// **********************************************
2017-08-03 18:23:43 +00:00
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
2017-08-12 20:52:55 +00:00
self.window.backgroundColor = [UIColor whiteColor];
[[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation launchOptions:launchOptions];
// RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
// moduleName:@"RocketChatRN"
// initialProperties:nil
// launchOptions:launchOptions];
// rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
//
// self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
// UIViewController *rootViewController = [UIViewController new];
// rootViewController.view = rootView;
// self.window.rootViewController = rootViewController;
// [self.window makeKeyAndVisible];
2017-08-03 18:23:43 +00:00
return YES;
}
@end