Skip to content

Commit c396f1b

Browse files
authored
fix: update iOS TurboModule template (#889)
### Summary Updates iOS `.mm` TurboModule template file to match https://reactnative.dev/docs/turbo-native-modules-introduction#4-write-your-native-platform-code ### Test plan Module generates correctly, app consuming it builds as expected
1 parent 55612c7 commit c396f1b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/create-react-native-library/templates/objc-library/ios/{%- project.name %}.mm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
@implementation <%- project.name -%>
44

5-
RCT_EXPORT_MODULE()
6-
75
- (NSNumber *)multiply:(double)a b:(double)b {
86
NSNumber *result = @(a * b);
97

@@ -16,4 +14,9 @@ - (NSNumber *)multiply:(double)a b:(double)b {
1614
return std::make_shared<facebook::react::Native<%- project.name -%>SpecJSI>(params);
1715
}
1816

17+
+ (NSString *)moduleName
18+
{
19+
return @"<%- project.name -%>";
20+
}
21+
1922
@end

0 commit comments

Comments
 (0)