This post resolve how to clear cookie for WKWebView.
But the -[WKWebsiteDataStore removeDataOfTypes:]
API only clear cookies when there is a WKWebView alive.
This is problematic because WKWebViews can be deallocated at any time during the app's lifecycle and this API should not be dependent on that.
There is a bug reported in WebKit website : https://bugs.webkit.org/show_bug.cgi?id=149078 (which has an app demo)
But no solution yet. Any Help?