HomeiOS DevelopmentHow you can clear browser cookies in .internet maui for iOS

How you can clear browser cookies in .internet maui for iOS


To open a browser in .internet maui we’re utilizing:

await Browser.Default.OpenAsync(_viewModel.OMNIANotificationParamter.NotificationURL, BrowserLaunchMode.SystemPreferred);

We need to clear cookies earlier than it, and for android we use:

CookieManager.Occasion.RemoveAllCookies(null);
CookieManager.Occasion.Flush();

However the earlier code shouldn’t be acknowledged for iOS.

What can we use for iOS?

Now we have tried to make use of the next, however we didn’t succeeded in compilation:

var storage = NSHttpCookieStorage.SharedStorage;
var cookies = storage.Cookies;

foreach (var cookie in cookies) 
{
    storage.DeleteCookie(cookie);
}

Any assist please?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments