Skip to content

Commit 08818c8

Browse files
committed
fix: fix argument names for obj-c
1 parent f720f60 commit 08818c8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

templates/cpp-library/ios/<%= project.name %>.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ @implementation <%= project.name %>
66

77
// Example method for C++
88
RCT_EXPORT_METHOD(multiply:(nonnull NSNumber*)a withB:(nonnull NSNumber*)b
9-
resolver:(RCTPromiseResolveBlock)resolve
10-
reject:(RCTPromiseRejectBlock)reject)
9+
withResolver:(RCTPromiseResolveBlock)resolve
10+
withReject:(RCTPromiseRejectBlock)reject)
1111
{
1212
NSNumber *result = @(example::multiply([a floatValue], [b floatValue]));
1313

templates/objc-library/ios/<%= project.name %>.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ @implementation <%= project.name %>
77
// Example method
88
// See // https://facebook.github.io/react-native/docs/native-modules-ios
99
RCT_REMAP_METHOD(multiply,
10-
withA:(nonnull NSNumber*)a withB:(nonnull NSNumber*)b
11-
resolver:(RCTPromiseResolveBlock)resolve
12-
rejecter:(RCTPromiseRejectBlock)reject)
10+
multiplyWithA:(nonnull NSNumber*)a withB:(nonnull NSNumber*)b
11+
withResolver:(RCTPromiseResolveBlock)resolve
12+
withRejecter:(RCTPromiseRejectBlock)reject)
1313
{
1414
NSNumber *result = @([a floatValue] * [b floatValue]);
1515

0 commit comments

Comments
 (0)