From 67ceaa729e98c9a2996955adcddf9119b4e78261 Mon Sep 17 00:00:00 2001 From: wwwcg Date: Thu, 28 Nov 2024 15:21:24 +0800 Subject: [PATCH] chore(ios): resolve turbo module typo --- .../ios-demo/HippyDemo/TurboModuleDemo/TurboBaseModule.mm | 4 ++-- framework/ios/base/modules/HippyModulesSetup.m | 2 +- framework/ios/module/turbo/HippyOCTurboModule.mm | 2 +- framework/ios/module/turbo/HippyTurboModule.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/framework/examples/ios-demo/HippyDemo/TurboModuleDemo/TurboBaseModule.mm b/framework/examples/ios-demo/HippyDemo/TurboModuleDemo/TurboBaseModule.mm index 4fff421f107..a3cae27b5ae 100644 --- a/framework/examples/ios-demo/HippyDemo/TurboModuleDemo/TurboBaseModule.mm +++ b/framework/examples/ios-demo/HippyDemo/TurboModuleDemo/TurboBaseModule.mm @@ -57,11 +57,11 @@ @implementation TurboBaseModule } HIPPY_EXPORT_TURBO_METHOD(getTurboConfig) { - return [self.bridge turboModuleWithName:[TurboConfig turoboModuleName]]; + return [self.bridge turboModuleWithName:[TurboConfig turboModuleName]]; } HIPPY_EXPORT_TURBO_METHOD(printTurboConfig:(TurboConfig *)turboConfig) { - TurboConfig *localConfig = (TurboConfig *)[self.bridge turboModuleWithName:[TurboConfig turoboModuleName]]; + TurboConfig *localConfig = (TurboConfig *)[self.bridge turboModuleWithName:[TurboConfig turboModuleName]]; NSLog(@"====> turboConfig:%@, self.turboConfig:%@", turboConfig, localConfig); return [turboConfig description]; } diff --git a/framework/ios/base/modules/HippyModulesSetup.m b/framework/ios/base/modules/HippyModulesSetup.m index 234b7362d17..905b68de3f1 100644 --- a/framework/ios/base/modules/HippyModulesSetup.m +++ b/framework/ios/base/modules/HippyModulesSetup.m @@ -66,7 +66,7 @@ void HippyRegisterModule(Class moduleClass) { if ([cls conformsToProtocol:@protocol(HippyBridgeModule)]) { name = [cls moduleName]; } else if ([cls conformsToProtocol:@protocol(HippyTurboModule)]) { - name = [cls turoboModuleName]; + name = [cls turboModuleName]; } if (name.length == 0) { name = NSStringFromClass(cls); diff --git a/framework/ios/module/turbo/HippyOCTurboModule.mm b/framework/ios/module/turbo/HippyOCTurboModule.mm index c520a2bb9e5..84077e48ee5 100644 --- a/framework/ios/module/turbo/HippyOCTurboModule.mm +++ b/framework/ios/module/turbo/HippyOCTurboModule.mm @@ -199,7 +199,7 @@ - (id)invokeObjCMethodWithName:(NSString *)methodName HippyOCTurboModule *module) { HippyJSExecutor *jsExecutor = (HippyJSExecutor *)module.bridge.javaScriptExecutor; if ([objcObject isKindOfClass:[HippyOCTurboModule class]]) { - NSString *name = [[objcObject class] turoboModuleName]; + NSString *name = [[objcObject class] turboModuleName]; std::shared_ptr value = [jsExecutor JSTurboObjectWithName:name]; HippyTurboModuleManager *turboManager = module.bridge.turboModuleManager; [turboManager bindJSObject:value toModuleName:name]; diff --git a/framework/ios/module/turbo/HippyTurboModule.h b/framework/ios/module/turbo/HippyTurboModule.h index 10643569a31..71efbee428e 100644 --- a/framework/ios/module/turbo/HippyTurboModule.h +++ b/framework/ios/module/turbo/HippyTurboModule.h @@ -36,11 +36,11 @@ @protocol HippyTurboModule // Implemented by HIPPY_EXPORT_TURBO_MODULE -+ (NSString *)turoboModuleName; ++ (NSString *)turboModuleName; #define HIPPY_EXPORT_TURBO_MODULE(js_name) \ HIPPY_EXTERN void HippyRegisterTurboModule(NSString *, Class); \ - +(NSString *)turoboModuleName { \ + +(NSString *)turboModuleName { \ return @ #js_name; \ } \ +(void)load { \