简体   繁体   English

在iOS应用程序中删除Cookie

[英]Deleting cookies in iOS application

Do I read the NSHTTPCookieStorage documentation right that you can't delete other cookies than on those belonging to your own app? 我是否正确阅读了NSHTTPCookieStorage文档 ,您不能删除属于自己应用程序的Cookie以外的其他Cookie? So if you loop through all the cookies you get from that object you only get those cookies associated with your application such as those retrieved in a webview? 因此,如果您遍历从该对象获得的所有cookie,那么您只会得到与您的应用程序关联的cookie,例如在Webview中检索到的cookie?

iOS Note: Cookies are not shared among applications in iOS. iOS注意:Cookies不会在iOS中的应用程序之间共享。

Yes you read it correctly. 是的,您可以正确阅读。 The previous line in the doc ( These cookies are shared among all applications and are kept in sync cross-process ) is there for OS X. Cookie sharing among apps would be an enormous security violation. 文档的上一行( These cookies are shared among all applications and are kept in sync cross-process )适用于OSX。在应用程序之间共享cookie将严重违反安全性。 And though I haven't tried it, I'm confident that yes, enumerating cookies on iOS just gives you those stored for your app. 尽管我还没有尝试过,但是我有信心,在iOS上枚举cookie只会为您存储为您的应用存储的cookie。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM