Skip to content

Commit e57aff9

Browse files
makepaniccharafau
authored andcommitted
fix: result cleanCookies in iOS (#585)
1 parent 9c433c2 commit e57aff9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

ios/Classes/FlutterWebviewPlugin.m

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
6262
[self stopLoading];
6363
result(nil);
6464
} else if ([@"cleanCookies" isEqualToString:call.method]) {
65-
[self cleanCookies];
65+
[[NSURLSession sharedSession] resetWithCompletionHandler:^{
66+
result(nil);
67+
}];
6668
} else if ([@"back" isEqualToString:call.method]) {
6769
[self back];
6870
result(nil);
@@ -289,11 +291,6 @@ - (void)reload {
289291
}
290292
}
291293

292-
- (void)cleanCookies {
293-
[[NSURLSession sharedSession] resetWithCompletionHandler:^{
294-
}];
295-
}
296-
297294
- (bool)checkInvalidUrl:(NSURL*)url {
298295
NSString* urlString = url != nil ? [url absoluteString] : nil;
299296
if (_invalidUrlRegex != [NSNull null] && urlString != nil) {

0 commit comments

Comments
 (0)