{ "id": "173221", "key": "TIMOB-26915", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2019-03-20T21:09:40.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "breaking-change", "cookies", "webview" ], "versions": [ { "id": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "issuelinks": [ { "id": "57273", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "173202", "key": "TIMOB-26903", "fields": { "summary": "iOS: Webview Cookies is not working with 8.0.0.GA", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "59183", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "176045", "key": "TIMOB-28347", "fields": { "summary": "android: implement cookie in webview to have parity", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-03-22T19:22:07.000+0000", "status": { "description": "Submitted for code review", "name": "In Review", "id": "10003", "statusCategory": { "id": 4, "key": "indeterminate", "colorName": "yellow", "name": "In Progress" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "From SDK 8.0.0 we have started using WKWebView. NSHTTPCookie is not compatible with WKWebView. \r\nFrom iOS 11+ apple has given WKHTTPCookieStore in WKWebView to support cookie.\r\nWe need to use WKHTTPCookieStore to implement cookie for iOS 11.0+.\r\n\r\nCurrently we have implemented using description as given in below link - \r\n https://stackoverflow.com/questions/26573137\r\n https://github.com/haifengkao/YWebView\r\n\r\nFollowing points need to be considered while implementation -\r\n1. In titanium cookies are cross platform. So parity should be there.\r\n2. It should be supported for iOS <11.0 as we minimum iOS version in SDK is 9.0\r\n\r\nEdit - \r\n\r\n 1. From SDK 10, minimum iOS target is iOS 11. Now it can be implemented without worrying about point 2 .\r\n2. It will be breaking change as it will not sync with Ti.Network.HTTPClient cookies. Every webview will have its own cookie management.\r\n3. Can we have android parity as well?\r\n4. New WebView cookie APIs -\r\n\r\nMethod -\r\na) webview.addCookie(Titanium.Network.Cookie);\r\nb) webview.removeCookie('domain', 'path', 'name');\r\nc) webview.removeAllCookies();\r\nd) webview.removeCookiesForDomain('domain') -> Array(Titanium.Network.Cookie)\r\ne) webview.getCookies(''domain', 'path', 'name') -> Array(Titanium.Network.Cookie)\r\nf) webview.cookiesForDomain('domain') -> Array(Titanium.Network.Cookie)\r\n\r\nProperty (read-only) -\r\ne) webview.allCookies -> Array(Titanium.Network.Cookie)", "attachment": [], "flagged": false, "summary": "iOS: Implement cookie in TiUIWebView using WKHTTPCookieStore", "creator": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "458191", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR - https://github.com/appcelerator/titanium_mobile/pull/12451", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-02-09T02:38:27.000+0000", "updated": "2021-02-09T02:38:27.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }