后端发送的 cookie 被存储,但不是应用程序本身设置的。以下代码:
document.cookie = "notified=1; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT";
console.log(document.cookie);
返回空字符串 ("")。Angularjs $cookies.put 也不起作用。
此外,在 Safari 网络检查器中,localhost cookie 列表保持为空。这仅在iOS中,在Android上没有问题。有没有机会让它发挥作用?我尝试了 cordova-plugin-wkwebview-cookie-sync 插件,但它可能适用于后端设置的 cookie,它对我的问题没有帮助。