Search results for

ASWebAuthenticationSession cookie

1,297 results found

Post

Replies

Boosts

Views

Activity

Reply to Memory leak when using global variable in a swift function from C
What are the symptoms of this memory leak? Is this something reported by the Leaks instrument? Or are you using “leak” in some more generic fashion?As the function to be called from C cannot be formed from a closure that captures context, I create a global variableThat’s a weird way to do things. Most C APIs that support callbacks also allow you to pass in a void * pointer for callback-specific data (typically described as an info pointer, a cookie, a refCon, or something else). You can use this to get back to a Swift closure (see this post) or use it to store the object pointer and then have the C calling convention Swift function recover self from that. For an example of the latter, check out my use of CFHostSetClient in the Swift part of CFHostSample. Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’18
unable to load a third party banking WebView's in device works fine on simulator
We are unable to load a webview in ios devices, the same works fine in simulator. while debugging we cam eto know that cookie is not getting persisted inside the app. I have tried alomost everything to resolve the issue, but unable to do it.We are using a post request which we need to fire in wkwebview, but seems that cookies are not getting persisted in the wkwebview.I am totally stuck and need to figure out why it snot working in device when it works on simulator. We are using the WKwebview.Did anyone faced this issue?The app session and webpage sesions are diffrent when webpage is loaded.Please help urgently.
0
0
788
Dec ’18
Reply to WKWebView: userContentController leaks script message handlers if you do not explicitly remove them before the web view is deallocated
Damned if you do and damned if you don't. It turns out that WKWebView doesn't fully deallocate itself. About 30 seconds after you try to deallocate it it generates a call to it's cookie something-or-other and generates a strange error. Search for the error Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service or go directly to stackoverflow 44585980
Topic: UI Frameworks SubTopic: UIKit Tags:
Jan ’19
Reply to How to create a helper app for macOS
Thanks for your answer. After reading some documentation and implementing an XPC Service sample for my playground project, it seems, that XPC Services are embedded in apps. I havent found any documentation about external XPC Services, that run independently from a parent app. I found somethin about launch deamons: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/DesigningDaemons.htmlThis seems to be something different. Then I come back to the idea to make a scriptable main app and write a terminal app, that calls the main app with an object. An other approach could be to deploy an optional embedded XPC Service inside the app folder after the main app was downloaded and installed from the store. But I assume, that this would damage the integrity of the main app. I think, we must find a solution with a helper app, that is downloadod outside the store. We wouldn't be the only app in the store, that requires an additional download. Cookie 5 is an examp
Topic: UI Frameworks SubTopic: AppKit Tags:
Jan ’19
Reply to Setting cookies with WKHTTPCookieStorage do not sync with wkwebview
@AlexOak a thousand thank yous for posting this solution. It's crazy that this is necessary, but it works. Did you file a bug report with Apple for this? I've spent untold hours trying to figure out why cookies are sometimes set and sometimes not, with different results pretty much every time I ran the app. Just adding the observer fixes the problem completely.
Jan ’19
DTLS 1.0 Failing with errSSLRecordOverflow
I have a DTLS implementation using Apple's libraries and during the SSLHandshake it fails with `errSSLRecordOverflow`.It seems to happen when there's fragmentation in the Handshake as shown by the capture below:No. Time Source Destination Protocol Length Info 1 0.000000 177.168.36.85 3.80.173.20 DTLSv1.0 166 Client Hello Frame 1: 166 bytes on wire (1328 bits), 166 bytes captured (1328 bits) Null/Loopback Internet Protocol Version 4, Src: 177.168.36.85, Dst: 3.80.173.20 User Datagram Protocol, Src Port: 56732, Dst Port: 80 Datagram Transport Layer Security DTLSv1.0 Record Layer: Handshake Protocol: Client Hello Content Type: Handshake (22) Version: DTLS 1.0 (0xfeff) Epoch: 0 Sequence Number: 0 Length: 121 Handshake Protocol: Client Hello Handshake Type: Client Hello (1) Length: 109 Message Sequence: 0 Fragment Offset: 0 Fragment Length: 109 Version: DTLS 1.0 (0xfeff) Random: 5c363e2a2dff285b8752bdf572a37d3a61d53e46bbe1c8d3... Session ID Length: 0 Cookie Length: 0 Cipher Suites Length: 32 Cipher Suites
0
0
847
Jan ’19
Reply to iOS 11.3: WKWebView cookie synchronizing stopped working
The problem with syncing cookies to WKWebView lies in WKProcessPool. To properly sync cookie, you have to create an instance of WKProcessPool and set it to the WKWebViewConfiguration that is to be used to initialize the WkWebview itself: private lazy var mainWebView: WKWebView = { let webConfiguration = WKWebViewConfiguration() if Enviroment.shared.processPool == nil { Enviroment.shared.processPool = WKProcessPool() } webConfiguration.processPool = Enviroment.shared.processPool! webConfiguration.processPool = WKProcessPool() let webView = WKWebView(frame: .zero, configuration: webConfiguration) webView.navigationDelegate = self return webView }()Setting WKProcessPool is the most important step here. WKWebview makes use of process isolation - which means it runs on a different process than the process of your app. This can sometimes cause conflict and prevent your cookie from being synced properly with the WKWebview. If you don't use the same instance of WKProcessPool each time you c
Topic: Safari & Web SubTopic: General Tags:
Jan ’19
Reply to Setting cookies with WKHTTPCookieStorage do not sync with wkwebview
The problem with syncing cookies to WKWebView lies in WKProcessPool. To properly sync cookie, you have to create an instance of WKProcessPool and set it to the WKWebViewConfiguration that is to be used to initialize the WkWebview itself: private lazy var mainWebView: WKWebView = { let webConfiguration = WKWebViewConfiguration() if Enviroment.shared.processPool == nil { Enviroment.shared.processPool = WKProcessPool() } webConfiguration.processPool = Enviroment.shared.processPool! webConfiguration.processPool = WKProcessPool() let webView = WKWebView(frame: .zero, configuration: webConfiguration) webView.navigationDelegate = self return webView }()Setting WKProcessPool is the most important step here. WKWebview makes use of process isolation - which means it runs on a different process than the process of your app. This can sometimes cause conflict and prevent your cookie from being synced properly with the WKWebview. If you don't use the same instance of WKProcessPool each time you c
Jan ’19
Programmatically expire SFSafariViewController session cookies
Is there a way to force SFSafariViewController to expire any session cookies that may have been set since the last app launch?The use case for this is using SFSafariViewController for an oauth login page. If the user logs in via the oauth page, then logs out inside of the native part of the app, then attempts to log in again, they may be logged in automatically or session cookies from the previous user may be present. It would be ideal to have some API to call to signal to Safari Services that the current session has ended, and any session cookies should be discarded.If the app is quit at any time, either by force-quitting or being ended by the system, this issue doesn't happen.
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
876
Jan ’19
Server-side cookies in Safari 12
Can someone help to set server-side cookies in Safari 12? We use server-side cookies (Set-Cookie HTTP header in server response used to set the appropriate cookie on client side). We found the new version of Safari doesn’t set server-side cookies in iframe (In Safari 11 it works fine).As we know, client-side cookie can be set in iframe after the user visited site inside iframe, but for server-side cookie this way doesn’t work. Does any other way exist to help us to set server-side cookie in iframe?
0
0
1.3k
Jan ’19
Question about ITP 2.0
Hello, Here is our current use case, with domains changed to sample ones:We have an iOS app which has a button to a deep link to open page exampleauthdomain.com in Safari. Once the page exampleauthdomain.com opens in Safari, the user is asked to click a button to accept. Upon clicking the button, a cookie is set for exampleauthdomain.com and the user is redirected via JavaScript to another page. 

Later in the flow, the user visits another page that we vend in Safari, testdomain.com. In the testdomain.com page, there is an XMLHttpRequest to exampleauthdomain.com with the flag `withCredentials`[2] set to true. However, we notice that the cookie that was set on exampleauthdomain.com is not always sent up to the server.

As per our understanding from this excerpt from [1]:“Is it enough for users to visit my website to keep its cookies from being purged if my domain gets classified by ITP?No, a mere visit does not suffice. The user has to interact with your website, meaning a tap, click
0
0
1.7k
Jan ’19
Kernal panic "bluetoothaudiod"
Was just wondering if someone could take a look at this log, I was running Airfoil which allows you to use multiple Bluetooth speakers in sync. After detaching a bluetooth device manually by unplugging it I experiance the panic. I was just trying to figure out if the crash was due to the software or due to an issue with Core Bluetooth, I am not that experienced with macs so I’m not even sure if it’s possible to determine that solely based off the log, regardless here it is. (Also I was downloading a mac update at the time but I don't suspect that as the cause)Thu Jan 31 16:19:36 2019*** Panic Report ***panic(cpu 2 caller 0xffffff800d5ff533): a freed zone element has been modified in zone kalloc.32: expected 0xdeadbeefdeadbeef but found 0xffffff803279e6c0, bits changed 0x2152416fecd4582f, at offset 16 of 32 in element 0xffffff803279e500, cookies 0x3f00112308ec41f6 0x53521baefa4fa17@/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-4903.201.2/osfmk/kern/zalloc.c:1168Backtrace (CPU 2), Frame : Ret
0
0
926
Jan ’19
Reply to iOS 11.3: WKWebView cookie synchronizing stopped working
Hello!I finally solve this problem successfully,I used the webView navigationResponse: WKNavigationResponse to get cookies and save them to local storage, and every time the application started, I consulted the localstorage to get saved cookies and inject them into httpCookieStore before the first load of the webViewI hope this can help sameone.Att,Khalid Ait Bellahshttps://www.tialtonivel.com.br
Topic: Safari & Web SubTopic: General Tags:
Feb ’19