Skip to content

Commit c23ffc9

Browse files
author
Yogesh Singh
committed
SDK-129: added set defaults map API
1 parent 48ba505 commit c23ffc9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ios/Classes/CleverTapPlugin.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
235235
[self activate:call withResult:result];
236236
else if ([@"fetchAndActivate" isEqualToString:call.method])
237237
[self fetchAndActivate:call withResult:result];
238+
else if ([@"setDefaultsMap" isEqualToString:call.method])
239+
[self setDefaultsMap:call withResult:result];
238240
else if ([@"createNotification" isEqualToString:call.method])
239241
result(nil);
240242
else if ([@"createNotificationChannel" isEqualToString:call.method])
@@ -883,6 +885,11 @@ - (void)fetchAndActivate:(FlutterMethodCall *)call withResult:(FlutterResult)res
883885
result(nil);
884886
}
885887

888+
- (void)setDefaultsMap:(FlutterMethodCall *)call withResult:(FlutterResult)result {
889+
[[[CleverTap sharedInstance] productConfig] setDefaults:call.arguments[@"defaults"]];
890+
result(nil);
891+
}
892+
886893

887894

888895
#pragma mark - Helpers

0 commit comments

Comments
 (0)