Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ios): resolve turbo module typo #4139

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading