Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9.  
  10. #import "AppDelegate.h"
  11.  
  12. #import <React/RCTBundleURLProvider.h>
  13. #import <React/RCTRootView.h>
  14.  
  15. @implementation AppDelegate
  16.  
  17. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  18. {
  19. NSURL *jsCodeLocation;
  20.  
  21. jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
  22.  
  23. RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
  24. moduleName:@"BBReactNativeSOL"
  25. initialProperties:nil
  26. launchOptions:launchOptions];
  27. rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  28.  
  29. self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  30. UIViewController *rootViewController = [UIViewController new];
  31. rootViewController.view = rootView;
  32. self.window.rootViewController = rootViewController;
  33. [self.window makeKeyAndVisible];
  34. return YES;
  35. }
  36.  
  37. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement