iOS UIWebView 和 Cookies 存储

iOS UIWebView and Cookies storage

我使用 Cordova 4、Angular 1.4 和 Ionic 1.3 为 Android 和 iOS 制作平板电脑应用。

当用户同步数据时,应用打开另一个window(cordova-plugin-inappbrowser)并显示我们的SSO网页。当用户结束连接时,window 关闭并再次发送同步。

Android 在应用程序关闭时存储会话 cookie,但 iOS 不存储。 每次用户在 iOS 上打开应用程序时,他都需要打开 window 身份验证器。

是否可以在 iOS 上存储更长的 cookie?

谢谢

EVURLCache可能对你有帮助。

This is a NSURLCache subclass for handeling all web requests that use NSURLRequest. (This includes UIWebView)

The EVURLCache is meant for handeling the following caching strategies:

  • The app has to be functional even if there is no internet connection.
  • The app has to be functional right after the app has been downloaden from the app store. (This means that the required content can be included in the app.)
  • You do want to be a able to download new/updated content if it's available.

注:

支持:iOS 8+OSX 10.9+WOS 2+TVOS 9+