Clean up appdelegate
This commit is contained in:
parent
51e1726f78
commit
74fbc4e9c0
|
@ -1,7 +1,5 @@
|
|||
#import "AppDelegate.h"
|
||||
// #import <React/RCTBridge.h>
|
||||
#import <React/RCTBundleURLProvider.h>
|
||||
// #import <React/RCTRootView.h>
|
||||
#import <React/RCTLinkingManager.h>
|
||||
#import "RNNotifications.h"
|
||||
#import "RNBootSplash.h"
|
||||
|
@ -10,53 +8,10 @@
|
|||
#import <Bugsnag/Bugsnag.h>
|
||||
#import <MMKV/MMKV.h>
|
||||
|
||||
// #import <React/RCTAppSetupUtils.h>
|
||||
// #if RCT_NEW_ARCH_ENABLED
|
||||
// #import <React/CoreModulesPlugins.h>
|
||||
// #import <React/RCTCxxBridgeDelegate.h>
|
||||
// #import <React/RCTFabricSurfaceHostingProxyRootView.h>
|
||||
// #import <React/RCTSurfacePresenter.h>
|
||||
// #import <React/RCTSurfacePresenterBridgeAdapter.h>
|
||||
// #import <ReactCommon/RCTTurboModuleManager.h>
|
||||
// #import <react/config/ReactNativeConfig.h>
|
||||
|
||||
// static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
||||
|
||||
// @interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> {
|
||||
// RCTTurboModuleManager *_turboModuleManager;
|
||||
// RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
|
||||
// std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
|
||||
// facebook::react::ContextContainer::Shared _contextContainer;
|
||||
// }
|
||||
// @end
|
||||
// #endif
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
// RCTAppSetupPrepareApp(application);
|
||||
// RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];
|
||||
// #if RCT_NEW_ARCH_ENABLED
|
||||
// _contextContainer = std::make_shared<facebook::react::ContextContainer const>();
|
||||
// _reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
|
||||
// _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
|
||||
// _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
|
||||
// bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
|
||||
// #endif
|
||||
// if(![FIRApp defaultApp]){
|
||||
// [FIRApp configure];
|
||||
// }
|
||||
// [Bugsnag start];
|
||||
|
||||
// NSDictionary *initProps = [self prepareInitialProps];
|
||||
// UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"RocketChatRN", initProps);
|
||||
|
||||
// if (@available(iOS 13.0, *)) {
|
||||
// rootView.backgroundColor = [UIColor systemBackgroundColor];
|
||||
// } else {
|
||||
// rootView.backgroundColor = [UIColor whiteColor];
|
||||
// }
|
||||
|
||||
// self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
// UIViewController *rootViewController = [UIViewController new];
|
||||
|
@ -64,17 +19,6 @@
|
|||
// navigationController.navigationBarHidden = YES;
|
||||
// rootViewController.view = rootView;
|
||||
// self.window.rootViewController = navigationController;
|
||||
// [self.window makeKeyAndVisible];
|
||||
// [RNNotifications startMonitorNotifications];
|
||||
// [ReplyNotification configure];
|
||||
|
||||
// // AppGroup MMKV
|
||||
// NSString *groupDir = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"AppGroup"]].path;
|
||||
// [MMKV initializeMMKV:nil groupDir:groupDir logLevel:MMKVLogInfo];
|
||||
|
||||
// [RNBootSplash initWithStoryboard:@"LaunchScreen" rootView:rootView];
|
||||
|
||||
// return YES;
|
||||
|
||||
if(![FIRApp defaultApp]){
|
||||
[FIRApp configure];
|
||||
|
@ -106,14 +50,6 @@
|
|||
// Switch this bool to turn on and off the concurrent root
|
||||
return false;
|
||||
}
|
||||
//- (NSDictionary *)prepareInitialProps
|
||||
//{
|
||||
// NSMutableDictionary *initProps = [NSMutableDictionary new];
|
||||
//#ifdef RCT_NEW_ARCH_ENABLED
|
||||
// initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
|
||||
//#endif
|
||||
// return initProps;
|
||||
//}
|
||||
|
||||
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
||||
{
|
||||
|
@ -124,37 +60,6 @@
|
|||
#endif
|
||||
}
|
||||
|
||||
// #if RCT_NEW_ARCH_ENABLED
|
||||
// #pragma mark - RCTCxxBridgeDelegate
|
||||
// - (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
|
||||
// {
|
||||
// _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
|
||||
// delegate:self
|
||||
// jsInvoker:bridge.jsCallInvoker];
|
||||
// return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
|
||||
// }
|
||||
// #pragma mark RCTTurboModuleManagerDelegate
|
||||
// - (Class)getModuleClassFromName:(const char *)name
|
||||
// {
|
||||
// return RCTCoreModulesClassProvider(name);
|
||||
// }
|
||||
// - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
|
||||
// jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
|
||||
// {
|
||||
// return nullptr;
|
||||
// }
|
||||
// - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
|
||||
// initParams:
|
||||
// (const facebook::react::ObjCTurboModule::InitParams &)params
|
||||
// {
|
||||
// return nullptr;
|
||||
// }
|
||||
// - (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
|
||||
// {
|
||||
// return RCTAppSetupDefaultModuleFromClass(moduleClass);
|
||||
// }
|
||||
// #endif
|
||||
|
||||
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
|
||||
{
|
||||
[RNNotifications didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
|
||||
|
|
Loading…
Reference in New Issue