Guest User

Untitled

a guest
Dec 16th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 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. /*New: Start*/
  16. #import "RCCManager.h"
  17. /*New: End*/
  18.  
  19. @implementation AppDelegate
  20.  
  21. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  22. {
  23. NSURL *jsCodeLocation;
  24.  
  25. jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  26.  
  27. RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
  28. moduleName:@"rnn"
  29. initialProperties:nil
  30. launchOptions:launchOptions];
  31. rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  32.  
  33. self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  34.  
  35. /*New: Start*/
  36. self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  37. self.window.backgroundColor = [UIColor whiteColor];
  38. [[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation launchOptions:launchOptions];
  39.  
  40. /*New: End*/
  41.  
  42.  
  43. /* Remove from Original
  44. UIViewController *rootViewController = [UIViewController new];
  45. rootViewController.view = rootView;
  46. self.window.rootViewController = rootViewController;
  47. [self.window makeKeyAndVisible];
  48. */
  49. return YES;
  50. }
  51.  
  52. @end
Add Comment
Please, Sign In to add comment