You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.7 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright 2013 The WebRTC Project Authors. All rights reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #import "ARDAppDelegate.h"
  11. #import <WebRTC/RTCFieldTrials.h>
  12. #import <WebRTC/RTCLogging.h>
  13. #import <WebRTC/RTCSSLAdapter.h>
  14. #import <WebRTC/RTCTracing.h>
  15. #import "ARDMainViewController.h"
  16. @implementation ARDAppDelegate {
  17. UIWindow *_window;
  18. }
  19. #pragma mark - UIApplicationDelegate methods
  20. - (BOOL)application:(UIApplication *)application
  21. didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  22. NSDictionary *fieldTrials = @{};
  23. RTCInitFieldTrialDictionary(fieldTrials);
  24. RTCInitializeSSL();
  25. RTCSetupInternalTracer();
  26. _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  27. [_window makeKeyAndVisible];
  28. ARDMainViewController *viewController = [[ARDMainViewController alloc] init];
  29. UINavigationController *root =
  30. [[UINavigationController alloc] initWithRootViewController:viewController];
  31. root.navigationBar.translucent = NO;
  32. _window.rootViewController = root;
  33. #if defined(NDEBUG)
  34. // In debug builds the default level is LS_INFO and in non-debug builds it is
  35. // disabled. Continue to log to console in non-debug builds, but only
  36. // warnings and errors.
  37. RTCSetMinDebugLogLevel(RTCLoggingSeverityWarning);
  38. #endif
  39. return YES;
  40. }
  41. - (void)applicationWillTerminate:(UIApplication *)application {
  42. RTCShutdownInternalTracer();
  43. RTCCleanupSSL();
  44. }
  45. @end