Brak opisu

AppDelegate.m 1.2KB

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import "AppDelegate.h"
  8. #import <React/RCTBundleURLProvider.h>
  9. #import <React/RCTRootView.h>
  10. @implementation AppDelegate
  11. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  12. {
  13. NSURL *jsCodeLocation;
  14. jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  15. RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
  16. moduleName:@"example573"
  17. initialProperties:nil
  18. launchOptions:launchOptions];
  19. rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  20. self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  21. UIViewController *rootViewController = [UIViewController new];
  22. rootViewController.view = rootView;
  23. self.window.rootViewController = rootViewController;
  24. [self.window makeKeyAndVisible];
  25. return YES;
  26. }
  27. @end