Search results for

ASWebAuthenticationSession cookie

1,295 results found

Post

Replies

Boosts

Views

Activity

AVPlayer + cookies
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?
1
0
2.0k
Mar ’18
What is the correct way of setting cookies on a request via WKWebView?
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
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
1.4k
Apr ’18
iOS 11.3: WKWebView cookie synchronizing stopped working
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
30
0
56k
Apr ’18
Reply to iOS 11.3: WKWebView cookie synchronizing stopped working
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:
Apr ’18