Skip to content

Commit 2fff872

Browse files
committed
add promise handler placeholder
1 parent 8039329 commit 2fff872

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ios/One.m

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,27 @@ @implementation RCTOne
4141
// declaration in order to reconcile with the ONE SDK for Android
4242
// and Javascript.
4343
RCT_EXPORT_METHOD(sendProperties:(NSString *)interaction
44-
forInteraction:(NSDictionary *)properties)
44+
properties:(NSDictionary *)properties
45+
resolver:(RCTPromiseResolveBlock)resolve
46+
rejecter:(RCTPromiseRejectBlock)reject)
4547
{
4648
[One sendProperties:properties forInteractionPath:interaction];
49+
resolve(nil);
4750
}
4851

4952
RCT_EXPORT_METHOD(sendBaseTouchpointProperties:(NSDictionary *)properties)
5053
{
5154
[One sendBaseTouchpointProperties:properties];
5255
}
5356

54-
RCT_EXPORT_METHOD(sendResponseCode:(NSString *)responseCode forInteraction:(NSString *)interaction)
57+
RCT_EXPORT_METHOD(sendResponseCode:(NSString *)interaction
58+
responseCode:(NSString *)responseCode
59+
resolver:(RCTPromiseResolveBlock)resolve
60+
rejecter:(RCTPromiseRejectBlock)reject
61+
)
5562
{
5663
[One sendResponseCode:responseCode forInteractionPath:interaction];
64+
resolve(nil);
5765
}
5866

5967
RCT_EXPORT_METHOD(optOut:(BOOL)optOut)

0 commit comments

Comments
 (0)