It appears that, on initialization, an AVURLAsset has a copy of the cookies from HTTPCookieStorage.shared.cookies, unless otherwise specified with the options parameter. This array of HTTPCookie is merely a copy of iOS's cookie store at the time of initialization. If the OS's cookie store updates, the player/asset does not begin to use the most up-to-date cookies, instead using its original copy. How can I go about updating the player's/asset's cookie store to the current, most up-to-date, cookie store?
Search results for
ASWebAuthenticationSession cookie
1,295 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello, as we know,httpCookieStore.setCookie just available after ios 11.0, I have saw the thread: https://forums.developer.apple.com/message/288999#288999I have tried set a cookie in the headers of the request or evaluateJavaScript:completionHandler,but it didn't work, could you tell me how to compatible of earlier ios 11.
As it is said in this older thread, that may be tricky to implement.Why not test for IOS version in your code, and only set cookie if 11.0 or more?Already more than 65% (probably now 70%) of IOS devices run IOS 11.h ttps://developer.apple.com/support/app-store/
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Hello, I know new is better, but don't set cookie in there, the older user can't see the content when need login, this is a problem.
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Sure, it is not as good. But can't you ask for login again ? just as if user had disabled cookies or for the first visit.
Topic:
Programming Languages
SubTopic:
Swift
Tags:
It can, but that is not the point, I just need a method set cookie into WKWebviewCookieStore of earlier than ios 11.
Topic:
Programming Languages
SubTopic:
Swift
Tags:
I'm working on converting an application to render its content in WKWebView from UIWebView. The application itself is a mix of native iOS UI and web components and there are multiple web views. I've created a shared WKProcessPool that each WKWebView instance gets via a common initialization path that has logic to create an identical WKWebViewConfiguration for each instance from a base configuration instance. Upon logging into the application, I call setCookie on the base configuration instance and don't allow the user to proceed into the application until after the cookie has been set.When I attempt to load content in the generated WKWebViews, I get a 401 from our server indicating that the user is not logged in. While debugging, I've confirmed that the cookie is in the web view's cookie store. I was able to get around this by overriding decidePolicyForNavigationAction and setting the cookie value as an HTTP header field. However, I feel like this step should not be needed
Hey guy, how can you fix the bug.How to synchronize cookie in WKWebview of earlier than ios 11Could you show me the code? Thanks !
Topic:
App & System Services
SubTopic:
Networking
Tags:
Hi,Anyone else having issues with WKWebView cookies after iOS 11.3? (Or any recomondations of what we might be doing wrong?)Working on an app with web content, we switched fro UIWebView to WKWebView after iOS 11.We use URLSession for authentication, then webviews to show content.In order to syncrhonzie cookies to WKWebViews, we have used the following procedure:1. Log in with URLSession2. Create a WKWebView with the cookies from the URLSession:let config = WKWebViewConfiguration() config.processPool = WKProcessPool() let cookies = HTTPCookieStorage.shared.cookies ?? [HTTPCookie]() cookies.forEach({ config.websiteDataStore.httpCookieStore.setCookie($0, completionHandler: nil) }) let wkWebView = WKWebView(frame: bounds, configuration: config) ...3. Load the URL.Worked like a charm, until iOS 11.3.Something fishy is happening, I have checked that the HTTPCookieStorage contains the correct cookies, and verified that the completionHandler of setCookie gets called before
It's working in Firefox.So I removed all cookies and local storage for itunsconnect, but still doesn't work in Chrome.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
Yes, I just figured out incognito works. I have also cleared all cookies and site data, and it still doesn't work in normal mode.Started disabling extensions, an disabling Evernote Web Clipper allowed me to get in. If I enable Evernote Web Clipper again, I can no longer get in.So looks like, in my case, the problem is Evernote Web Clipper
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
HelloAccording to wwdc 17 there is a way to observe cookies changes in WKWebView in iOs 11 (WebsiteDataStore.httpCookieStore).Could you provide example how to do that?
Did you tried to load WKWebView after cookies setting completion?Try to create dispatch group and create/load WkWebView in group.notify handler
Topic:
Safari & Web
SubTopic:
General
Tags:
it doesn't work on iOS 11.3. I'm creating web view after cookies injection and with sharing the same Pool. On iOS 11.2.6 it works as expected...
Topic:
Safari & Web
SubTopic:
General
Tags:
Someone recently opened a DTS incident with a report of a similar problem, which gave me the opportunity to try it out. In my tests I saw the cookie show up on 11.3 just fine. So there’s something specific about your app that’s triggering this.Did you try what dskibin suggested, namely, using a dispatch group to guarantee that your completion handlers are all called before you load up the web view?Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic:
Safari & Web
SubTopic:
General
Tags: