Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- #import "AppDelegate.h"
- #import <React/RCTBridge.h>
- #import <React/RCTBundleURLProvider.h>
- #import <React/RCTRootView.h>
- #import <FBSDKCoreKit/FBSDKCoreKit.h>
- #import <AVFoundation/AVFoundation.h>
- @import GoogleMaps;
- @implementation AppDelegate
- @synthesize oneSignal = _oneSignal;
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
- {
- RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
- RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
- moduleName:@"RnDiffApp"
- initialProperties:nil];
- self.oneSignal = [[RCTOneSignal alloc] initWithLaunchOptions:launchOptions
- appId:@"5b72d384-b140-4424-8954-8a3b6ae9ed13"];
- [GMSServices provideAPIKey:@"AIzaSyDpBfBs0Nuel0JJwSYCjtGwV0GhndQDcyI"];
- rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
- self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
- UIViewController *rootViewController = [UIViewController new];
- rootViewController.view = rootView;
- self.window.rootViewController = rootViewController;
- [self.window makeKeyAndVisible];
- [[FBSDKApplicationDelegate sharedInstance] application:application
- didFinishLaunchingWithOptions:launchOptions];
- return YES;
- }
- - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
- {
- #if DEBUG
- return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
- #else
- return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
- #endif
- }
- - (BOOL)application:(UIApplication *)application
- openURL:(NSURL *)url
- options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
- BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application
- openURL:url
- sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
- annotation:options[UIApplicationOpenURLOptionsAnnotationKey]
- ];
- // Add any custom logic here.
- return handled;
- }
- - (void)applicationDidBecomeActive:(UIApplication *)application {
- [FBSDKAppEvents activateApp];
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement