2018-12-05 00:18:46 +03:00
|
|
|
#import "AppDelegate.h"
|
2022-07-06 15:49:18 +03:00
|
|
|
#import "RNSplashScreen.h"
|
|
|
|
|
2019-09-11 22:42:49 +03:00
|
|
|
#import <AppCenterReactNativeShared/AppCenterReactNativeShared.h>
|
|
|
|
#import <AppCenterReactNative.h>
|
|
|
|
#import <AppCenterReactNativeAnalytics.h>
|
|
|
|
#import <AppCenterReactNativeCrashes.h>
|
2021-07-29 14:12:25 +03:00
|
|
|
#import <Bugsnag/Bugsnag.h>
|
2020-07-19 12:17:48 +03:00
|
|
|
#import <Firebase.h>
|
2018-12-05 00:18:46 +03:00
|
|
|
|
2019-09-11 22:42:49 +03:00
|
|
|
#import <React/RCTBridge.h>
|
2018-12-05 00:18:46 +03:00
|
|
|
#import <React/RCTBundleURLProvider.h>
|
|
|
|
#import <React/RCTRootView.h>
|
2019-01-21 17:02:25 +03:00
|
|
|
#import <React/RCTLinkingManager.h>
|
2022-03-26 16:14:59 +03:00
|
|
|
#import "Orientation.h"
|
2018-12-05 00:18:46 +03:00
|
|
|
|
|
|
|
@implementation AppDelegate
|
|
|
|
|
2020-07-28 18:46:43 +03:00
|
|
|
- (BOOL)application:(UIApplication *)application
|
|
|
|
openURL:(NSURL *)url
|
|
|
|
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
|
2019-01-21 17:02:25 +03:00
|
|
|
{
|
2020-07-28 18:46:43 +03:00
|
|
|
return [RCTLinkingManager application:application openURL:url options:options];
|
2019-01-21 17:02:25 +03:00
|
|
|
}
|
|
|
|
|
2021-06-09 17:37:55 +03:00
|
|
|
|
|
|
|
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
|
|
|
|
restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
|
|
|
|
{
|
|
|
|
return [RCTLinkingManager application:application
|
|
|
|
continueUserActivity:userActivity
|
|
|
|
restorationHandler:restorationHandler];
|
|
|
|
}
|
|
|
|
|
2018-12-05 00:18:46 +03:00
|
|
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
|
|
{
|
2020-07-19 12:17:48 +03:00
|
|
|
if ([FIRApp defaultApp] == nil) {
|
|
|
|
[FIRApp configure];
|
|
|
|
}
|
2019-09-11 22:42:49 +03:00
|
|
|
[AppCenterReactNative register];
|
|
|
|
[AppCenterReactNativeAnalytics registerWithInitiallyEnabled:true];
|
|
|
|
[AppCenterReactNativeCrashes registerWithAutomaticProcessing];
|
2021-07-29 14:12:25 +03:00
|
|
|
[Bugsnag start];
|
2019-05-29 14:32:35 +03:00
|
|
|
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
|
|
|
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
|
2020-07-17 14:22:06 +03:00
|
|
|
moduleName:@"Ecency"
|
2019-05-29 14:32:35 +03:00
|
|
|
initialProperties:nil];
|
2018-12-05 00:18:46 +03:00
|
|
|
|
|
|
|
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];
|
2022-07-06 15:49:18 +03:00
|
|
|
[RNSplashScreen show];
|
2018-12-05 00:18:46 +03:00
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
2019-05-29 14:32:35 +03:00
|
|
|
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
|
|
|
{
|
|
|
|
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
|
|
|
}
|
|
|
|
|
2022-03-26 16:14:59 +03:00
|
|
|
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
|
|
|
|
return [Orientation getOrientation];
|
|
|
|
}
|
2018-12-05 00:18:46 +03:00
|
|
|
@end
|