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

[Fix] Remove email and remove sms #805

Merged
merged 2 commits into from
Dec 18, 2023
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
4 changes: 2 additions & 2 deletions ios/Classes/OSFlutterUser.m
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ - (void)addEmail:(FlutterMethodCall *)call withResult:(FlutterResult)result {
}

- (void)removeEmail:(FlutterMethodCall *)call withResult:(FlutterResult)result {
NSString *email = call.arguments[@"email"];
NSString *email = call.arguments;
[OneSignal.User removeEmail:email];
result(nil);
}
Expand All @@ -121,7 +121,7 @@ - (void)addSms:(FlutterMethodCall *)call withResult:(FlutterResult)result {
}

- (void)removeSms:(FlutterMethodCall *)call withResult:(FlutterResult)result {
NSString *smsNumber = call.arguments[@"smsNumber"];
NSString *smsNumber = call.arguments;
[OneSignal.User removeSms:smsNumber];
result(nil);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class OneSignalUser {
/// Returns false if the specified [email] does not exist
/// on the user within the SDK, and no request will be made.
Future<void> removeEmail(String email) async {
return await _channel.invokeMethod("OneSignal#removeEmail");
return await _channel.invokeMethod("OneSignal#removeEmail", email);
}

/// Add a new SMS subscription to the current user.
Expand Down
Loading