Application Android et IOS pour l'amicale des élèves
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.

AppDelegate.m 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  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. #import <React/RCTLinkingManager.h>
  11. #import "RNSplashScreen.h"
  12. @implementation AppDelegate
  13. @synthesize window = _window;
  14. - (BOOL)application:(UIApplication *)application
  15. openURL:(NSURL *)url
  16. options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
  17. {
  18. return [RCTLinkingManager application:application openURL:url options:options];
  19. }
  20. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  21. {
  22. RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  23. RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"main" initialProperties:nil];
  24. rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  25. self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  26. UIViewController *rootViewController = [UIViewController new];
  27. rootViewController.view = rootView;
  28. self.window.rootViewController = rootViewController;
  29. [self.window makeKeyAndVisible];
  30. [RNSplashScreen show];
  31. return YES;
  32. }
  33. - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
  34. #ifdef DEBUG
  35. return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  36. #else
  37. return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
  38. #endif
  39. }
  40. @end