diff --git a/ios/StatusIm/AppDelegate.mm b/ios/StatusIm/AppDelegate.mm index 55e05c55900..242782de3e7 100644 --- a/ios/StatusIm/AppDelegate.mm +++ b/ios/StatusIm/AppDelegate.mm @@ -95,7 +95,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( bridge.surfacePresenter = _bridgeAdapter.surfacePresenter; #endif - UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"RnDiffApp", nil); + UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"StatusIm", nil); #if DEBUG //InitializeFlipper(application); @@ -157,12 +157,44 @@ - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserAct - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge { #if DEBUG - return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; #else return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; #endif } +#if RCT_NEW_ARCH_ENABLED +#pragma mark - RCTCxxBridgeDelegate +- (std::unique_ptr)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)getTurboModule:(const std::string &)name + jsInvoker:(std::shared_ptr)jsInvoker +{ + return nullptr; +} +- (std::shared_ptr)getTurboModule:(const std::string &)name + initParams: + (const facebook::react::ObjCTurboModule::InitParams &)params +{ + return nullptr; +} +- (id)getModuleInstanceFromClass:(Class)moduleClass +{ + return RCTAppSetupDefaultModuleFromClass(moduleClass); +} +#endif + + - (void)applicationWillResignActive:(UIApplication *)application { if ([[NSUserDefaults standardUserDefaults] boolForKey:@"BLANK_PREVIEW"]) { [self.window addSubview:_blankView];