Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26915

iOS: Implement cookie in TiUIWebView using WKHTTPCookieStore


    • Type: Improvement
    • Status: In Review
    • Priority: None
    • Resolution: Unresolved
    • Affects Version/s: Release 8.0.0
    • Fix Version/s: None
    • Component/s: iOS


      From SDK 8.0.0 we have started using WKWebView. NSHTTPCookie is not compatible with WKWebView.
      From iOS 11+ apple has given WKHTTPCookieStore in WKWebView to support cookie.
      We need to use WKHTTPCookieStore to implement cookie for iOS 11.0+.

      Currently we have implemented using description as given in below link -

      Following points need to be considered while implementation -
      1. In titanium cookies are cross platform. So parity should be there.
      2. It should be supported for iOS <11.0 as we minimum iOS version in SDK is 9.0

      Edit -

      1. From SDK 10, minimum iOS target is iOS 11. Now it can be implemented without worrying about point 2 .
      2. It will be breaking change as it will not sync with Ti.Network.HTTPClient cookies. Every webview will have its own cookie management.
      3. Can we have android parity as well?
      4. New WebView cookie APIs -

      Method -
      a) webview.addCookie(Titanium.Network.Cookie);
      b) webview.removeCookie('domain', 'path', 'name');
      c) webview.removeAllCookies();
      d) webview.removeCookiesForDomain('domain') -> Array(Titanium.Network.Cookie)
      e) webview.getCookies(''domain', 'path', 'name') -> Array(Titanium.Network.Cookie)
      f) webview.cookiesForDomain('domain') -> Array(Titanium.Network.Cookie)

      Property (read-only) -
      e) webview.allCookies -> Array(Titanium.Network.Cookie)


          Issue Links



              • Assignee:
                vijaysingh Vijay Singh
                vijaysingh Vijay Singh
              • Watchers:
                4 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration