Advertisement
kiojiotisha

appdelete

Sep 17th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  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.  
  8. #import "AppDelegate.h"
  9.  
  10. #import <React/RCTBridge.h>
  11. #import <React/RCTBundleURLProvider.h>
  12. #import <React/RCTRootView.h>
  13. #import <FBSDKCoreKit/FBSDKCoreKit.h>
  14. #import <AVFoundation/AVFoundation.h>
  15. @import GoogleMaps;
  16. @implementation AppDelegate
  17. @synthesize oneSignal = _oneSignal;
  18.  
  19. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  20. {
  21. RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  22. RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
  23. moduleName:@"RnDiffApp"
  24. initialProperties:nil];
  25. self.oneSignal = [[RCTOneSignal alloc] initWithLaunchOptions:launchOptions
  26. appId:@"5b72d384-b140-4424-8954-8a3b6ae9ed13"];
  27. [GMSServices provideAPIKey:@"AIzaSyDpBfBs0Nuel0JJwSYCjtGwV0GhndQDcyI"];
  28.  
  29. rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  30.  
  31. self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  32. UIViewController *rootViewController = [UIViewController new];
  33. rootViewController.view = rootView;
  34. self.window.rootViewController = rootViewController;
  35. [self.window makeKeyAndVisible];
  36. [[FBSDKApplicationDelegate sharedInstance] application:application
  37. didFinishLaunchingWithOptions:launchOptions];
  38. return YES;
  39. }
  40.  
  41. - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
  42. {
  43. #if DEBUG
  44. return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  45. #else
  46. return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
  47. #endif
  48. }
  49.  
  50. - (BOOL)application:(UIApplication *)application
  51. openURL:(NSURL *)url
  52. options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
  53.  
  54. BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application
  55. openURL:url
  56. sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
  57. annotation:options[UIApplicationOpenURLOptionsAnnotationKey]
  58. ];
  59. // Add any custom logic here.
  60. return handled;
  61. }
  62. - (void)applicationDidBecomeActive:(UIApplication *)application {
  63. [FBSDKAppEvents activateApp];
  64. }
  65.  
  66. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement