react-native-navigation的迁移库

main.m 879B

12345678910111213141516171819202122232425262728293031
  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 <UIKit/UIKit.h>
  10. #import "AppDelegate.h"
  11. #import "TestingAppDelegate.h"
  12. static bool isRunningTests()
  13. {
  14. NSDictionary* environment = [[NSProcessInfo processInfo] environment];
  15. NSString* testEnabled = environment[@"TEST_ENABLED"];
  16. return [testEnabled isEqualToString:@"YES"];
  17. }
  18. int main(int argc, char * argv[]) {
  19. @autoreleasepool {
  20. if (isRunningTests()) {
  21. return UIApplicationMain(argc, argv, nil, NSStringFromClass([TestingAppDelegate class]));
  22. } else {
  23. return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
  24. }
  25. }
  26. }