Skip to content

Commit

Permalink
chore(ios): resolve turbo module typo
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwcg committed Nov 28, 2024
1 parent d5cb464 commit 67ceaa7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down
2 changes: 1 addition & 1 deletion framework/ios/base/modules/HippyModulesSetup.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion framework/ios/module/turbo/HippyOCTurboModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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<hippy::napi::CtxValue> value = [jsExecutor JSTurboObjectWithName:name];
HippyTurboModuleManager *turboManager = module.bridge.turboModuleManager;
[turboManager bindJSObject:value toModuleName:name];
Expand Down
4 changes: 2 additions & 2 deletions framework/ios/module/turbo/HippyTurboModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
@protocol HippyTurboModule <NSObject>

// 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 { \
Expand Down

0 comments on commit 67ceaa7

Please sign in to comment.