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

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

c# - Update a combobox from a presenter (MVP) -