No Description

AppDelegate.m 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. #import "AppDelegate.h"
  10. #import <React/RCTBundleURLProvider.h>
  11. #import <React/RCTRootView.h>
  12. @implementation AppDelegate
  13. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  14. {
  15. NSURL *jsCodeLocation;
  16. jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  17. RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
  18. moduleName:@"Example"
  19. initialProperties:nil
  20. launchOptions:launchOptions];
  21. rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  22. self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  23. UIViewController *rootViewController = [UIViewController new];
  24. rootViewController.view = rootView;
  25. self.window.rootViewController = rootViewController;
  26. [self.window makeKeyAndVisible];
  27. return YES;
  28. }
  29. @end