1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
- #import "AppDelegate.h"
-
- #import <React/RCTBundleURLProvider.h>
- #import <React/RCTRootView.h>
-
- #import "RCCManager.h"
- #import <RCCNavigationController.h>
- #import <AVFoundation/AVFoundation.h>
-
- #import "OssViewController.h"
-
- @implementation AppDelegate
-
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
- {
- NSURL *jsCodeLocation;
-
- #ifdef DEBUG
- jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
- #else
- jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
- #endif
-
- // **********************************************
- // *** DON'T MISS: THIS IS HOW WE BOOTSTRAP *****
- // **********************************************
- self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
- self.window.backgroundColor = [UIColor whiteColor];
-
- [[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation];
- [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];
-
- return YES;
- }
-
- @end
|