ios - How to delete cookies in Nativescript -


i developing ios app using nativescript using angular. have webview in it. want delete cookies on click of button. how it?

for ios can user following code delete each cookies inside ios webview.

const cookies: = nshttpcookiestorage.sharedhttpcookiestorage.cookies;     if (typeof cookies !== 'undefined') {         (let = 0; < cookies.count; i++) {             const cookie: nshttpcookie = <nshttpcookie>cookies.objectatindex(i);             // let cookie: = cookies[i];             console.log(cookie);             nshttpcookiestorage.sharedhttpcookiestorage.deletecookie(cookie);         }     }     console.log(nshttpcookiestorage.sharedhttpcookiestorage.cookies); 

after last console.log there shouldn't cookies.

kind regards


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -