Recent

Author Topic: How are cookies share WebView, WKWebview, NSURLConnection  (Read 740 times)

MISV

  • Hero Member
  • *****
  • Posts: 783
How are cookies share WebView, WKWebview, NSURLConnection
« on: October 20, 2022, 11:48:46 am »
I have a crawler.

To login I have/intend user to login through an embedded browser. (WebView/WKWebView depending on IS)

The actual crawl may be used using NSURLConnection or WebView/WKWebView

- https://www.xamarinhelp.com/cookie-sharing-webview-http-client/

Quote
In iOS if you are using NSUrlSession, your cookies are shared automatically with the UIWebView/WKWebView and NSUrlSession.

To access the Cookie Container, you just need to call upon NSHttpCookieStorage.SharedStorage.Cookies.

So can anyone point me to some official documentation (somehow hard to find using Google) what combos of cookies are shared on MacOS/OSX?

OR how I would be go around copy cookies :)




trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: How are cookies share WebView, WKWebview, NSURLConnection
« Reply #1 on: February 27, 2023, 05:32:46 am »
Before OS X 10.11, cookies were shared. Since OS X 10.11 and macOS 10.12 they are no longer shared.

See: https://developer.apple.com/documentation/foundation/nshttpcookiestorage

 

TinyPortal © 2005-2018