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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -