Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

59 Zeilen
2.2 KiB

  1. #import "AppDelegate.h"
  2. #import <React/RCTBridge.h>
  3. #import <React/RCTBundleURLProvider.h>
  4. #import <React/RCTRootView.h>
  5. #ifdef FB_SONARKIT_ENABLED
  6. #import <FlipperKit/FlipperClient.h>
  7. #import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
  8. #import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
  9. #import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
  10. #import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
  11. #import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
  12. static void InitializeFlipper(UIApplication *application) {
  13. FlipperClient *client = [FlipperClient sharedClient];
  14. SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
  15. [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
  16. [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
  17. [client addPlugin:[FlipperKitReactPlugin new]];
  18. [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
  19. [client start];
  20. }
  21. #endif
  22. @implementation AppDelegate
  23. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  24. {
  25. #ifdef FB_SONARKIT_ENABLED
  26. InitializeFlipper(application);
  27. #endif
  28. RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  29. RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
  30. moduleName:@"LessPass"
  31. initialProperties:nil];
  32. rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  33. self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  34. UIViewController *rootViewController = [UIViewController new];
  35. rootViewController.view = rootView;
  36. self.window.rootViewController = rootViewController;
  37. [self.window makeKeyAndVisible];
  38. return YES;
  39. }
  40. - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
  41. {
  42. #if DEBUG
  43. return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  44. #else
  45. return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
  46. #endif
  47. }
  48. @end