mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-24 05:42:33 +03:00
63 lines
2.2 KiB
Objective-C
63 lines
2.2 KiB
Objective-C
/**
|
|
* 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 <AppCenterReactNativeShared/AppCenterReactNativeShared.h>
|
|
#import <AppCenterReactNative.h>
|
|
#import <AppCenterReactNativeAnalytics.h>
|
|
#import <AppCenterReactNativeCrashes.h>
|
|
#import <AppCenterReactNativePush.h>
|
|
#import <CodePush/CodePush.h>
|
|
#import <BugsnagReactNative/BugsnagReactNative.h>
|
|
|
|
#import <React/RCTBridge.h>
|
|
#import <React/RCTBundleURLProvider.h>
|
|
#import <React/RCTRootView.h>
|
|
#import <React/RCTLinkingManager.h>
|
|
|
|
@implementation AppDelegate
|
|
|
|
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
|
|
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
|
|
{
|
|
return [RCTLinkingManager application:application openURL:url
|
|
sourceApplication:sourceApplication annotation:annotation];
|
|
}
|
|
|
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
{
|
|
[AppCenterReactNativePush register];
|
|
[AppCenterReactNative register];
|
|
[AppCenterReactNativeAnalytics registerWithInitiallyEnabled:true];
|
|
[AppCenterReactNativeCrashes registerWithAutomaticProcessing];
|
|
[BugsnagReactNative start];
|
|
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
|
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
|
|
moduleName:@"eSteem"
|
|
initialProperties:nil];
|
|
|
|
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];
|
|
return YES;
|
|
}
|
|
|
|
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
|
{
|
|
#if DEBUG
|
|
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
|
#else
|
|
return [CodePush bundleURL];
|
|
#endif
|
|
}
|
|
|
|
@end
|