Search results for

ASWebAuthenticationSession cookie

1,295 results found

Post

Replies

Boosts

Views

Activity

Reply to NavigationStack with NavigationPath triggers multiple init/deinit of views in stack
TESTABLE CODE: public enum Destination: String, Codable, Hashable { case cookie = Cookie 🍪 case milk = Milk 🥛 } final class Router: ObservableObject { @Published var navPath = NavigationPath() func navigate(to destination: Destination) { navPath.append(destination) print(||| Router: add to navPath: (navPath.count)) } func navigateBack() { guard navPath.count > 0 else { return } navPath.removeLast() print(||| Router: remove from navPath: (navPath.count)) } func navigateToRoot() { guard navPath.count > 1 else { return } navPath.removeLast(navPath.count) } } struct RootView: View { @ObservedObject var router = Router() var body: some View { NavigationStack(path: $router.navPath) { List { Button(action: { router.navigate(to: .cookie) }, label: { Text(Destination.cookie.rawValue) }) Button(action: { router.navigate(to: .milk) }, label: { Text(Destination.milk.rawValue) }) } .navigationBarBackButtonHidden() .navigationDestination(for: Destination.self) { destination in let _ = pri
Topic: UI Frameworks SubTopic: SwiftUI
Jul ’24
Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage
Hi, I have an issue with App submission. My flow is: show third party cookie consent banner (is an external SDK) show ATT Apple with this message Allowing tracking will enable more personalized ads for you. Apple says this: You collect data to track after the user selects Ask App Not to Track on the App Tracking Transparency permission request. Specifically, we noticed the app accesses web content you own and collects cookies for tracking after the user asked you not to track them. Next Steps To resolve this issue, please revise the app so that you do not collect data for tracking purposes if the user does not give permission for tracking. Alternatively, if you do not collect cookies for tracking purposes, revise the cookie prompts that appear in the app to clarify you do not track users. in the rejection they put the ATT alert and the third party banner as the screen Do you have any input on this as Apple never says things clearly about what the problem is. Thank you
3
0
1.4k
Jun ’24
CSS files cached always
Hi Guy's,insteadI hope Apple developers also reading this articles, because the functionality of Safari development for Mac OS and iOS is strongly recomended to be changed.First at all I have working on simple site with css styles and html with small additions of Java and see next bug's (or features) provided by apple team.When I'm using safari 13 Develop console and set up ignore cache feature in Network tab is working for all content (html, fonts etc.) instead css stylesheets files. Css content still got by safari from memory and this is ver stupid idea. Always when I need to see my changes I have clean all cached data from all sites using Cmd + Option + R key combination. This method is unusable.More from this - I have connect iPhone with last iOS and mobile Safari version and do the same. Previous version has clean mobile safari cache when I do this action. Buit new version of Development console cleans only Mac Cache data not mobile cache. So, to check the site new look I need clean all mobile saved data
3
0
2.6k
Jun ’22
Reply to Affiliate Platforms for iOS apps?
Tracking App Store sales from partner promotions is tough because most affiliate platforms still depend on cookies. I encountered this challenge myself, so I developed a SaaS platform to tackle it. You can now set up affiliate programs in minutes, monitor sales, and effortlessly pay commissions to your partners. Interested? Connect with me on LinkedIn: https://www.linkedin.com/in/tonipeinoit I'm here to help you get started. Best of luck!
Topic: App & System Services SubTopic: StoreKit Tags:
Jun ’24
ASWebAuthenticationSession and error code 1
We're using this (on a mac) to do 3rd party authentication. The completion handler is getting Authentication session got error: [The operation couldn’t be completed. (com.apple.AuthenticationServices.WebAuthenticationSession error 1.)], in domain: [com.apple.AuthenticationServices.WebAuthenticationSession] That seems to be generated if the auth window is closed. However... it's not being closed, so we end up spawning a second one to do it, and this one seems to work.
2
0
1.4k
Jun ’24
WKWebView sometimes lose cookies after the app returns from suspension
I embedded a WKWebView in my SwiftUI app, and loaded a list of HTTPCookie into a WKWebViewConfiguration object: var wkWebViewConfiguration = WKWebViewConfiguration() let cookies: [HTTPCookie] = ... // logic that creates a list of HTTPCookie for cookie in cookies { wkWebViewConfiguration.websiteDataStore.httpCookieStore.setCookie(cookie) } This logic works but when the app returns to the foreground from a long suspension (more than an hour), sometimes the web view reloads the URL but the cookies are gone. I suspect the web content process is terminated and add a logic to reload the URL and the cookies on process termination: // WKNavigationDelegate method func webViewWebContentProcessDidTerminate(_ webView: WKWebView) { // reload the URL and cookies here } but the issue still persist, could there be any other reasons that the cookies are lost or is my above solution not sufficient to handle web content process termination? This issue is qu
Topic: Safari & Web SubTopic: General Tags:
5
0
4.7k
Feb ’24
ASWebAuthenticationSession with callbackURLScheme prior to iOS 17.4 not working as expected
I am trying to auth with a non-apple auth provider for a multi-platform service. I'm expecting to be able to use this to fetch the OAuth code after the user logs in to their auth provider. myRedirectHost = 'https' OR 'https://my.domain.com' where I also know the redirect path and query params and will extract them. ASWebAuthenticationSession(url: url, callbackURLScheme: myRedirectHost, completionHandler: handleAuthSessionResult) This works for iOS 17.4+ with that nice enum, but what about the rest of the users?
1
0
799
Jun ’24
Reply to CFNetwork Exception Issue Impacting Large Number of Users, Primarily on iOS 17
Starting with the quick question: I've noticed that in every crash report's stack trace, there is always a thread that includes JavaScriptCore. Could you please take a look at what it's doing? Basically, nothing? Strictly speaking, it's blocked in scavenger_thread_main, which is part of libpas a custom malloc implementation WebKit uses. WebKit has a nice write up of libpas and The Scavenger, but the direct answer is that it's just idling waiting for the next time it runs. I would like to ask, why would this problem occur when sorting cookies? What operation is this function performing that leads to the crash? The term sort there is slightly misleading. It's sort as in compare these two cookies and tell me which should be first, not please sort this big list of cookies. The actual crash is caused by dereferencing a pointer that references the domain name and which should not be NULL. It's doing that as part of inserting a cookie into the cookie store, which is what
Jun ’24
AppKit/Mac Catalyst apps are being rejected by App Review for launching default web browser for login
It seems that all macOS apps currently going through App Review which use ASWebAuthenticationSession (or SwiftUI webAuthenticationSession) are being rejected, because: Reason given: Guideline 4.0 - Design The user is taken to the default web browser to sign in or register for an account, which provides a poor user experience. See here for more details: https://forums.developer.apple.com/forums/thread/750400 If webAuthenticationSession is no longer permitted for production apps, what is the current recommended approach for implementing OAuth 2 authentication?
2
0
815
Jun ’24
Reply to CFNetwork Exception Issue Impacting Large Number of Users, Primarily on iOS 17
Thank you Kevin Elliott! I would like to ask, why would this problem occur when sorting cookies? What operation is this function performing that leads to the crash? If the crash is caused by a specific cookie value, could you tell me which specific attribute of the cookie is causing the problem? In addition, I tried to set breakpoints for these symbols in Xcode, but was unsuccessful. Could you tell me how to correctly set breakpoints so that I can better debug this problem? I really hope to get some specific tips so that I can better solve this problem. I really appreciate your help.
Jun ’24
Reply to CFNetwork Exception Issue Impacting Large Number of Users, Primarily on iOS 17
Hi, First off, the reason you weren't able to symbolicate the original logs is that the library UUID is missing from the crash logs. With a bit of digging I found crash logs that included CFNetwork from both system version. Here are the original and corrected library entries: Crash 1/iOS 17.5.1 (21F90): 0x19b497000 - 0x19b873fff CFNetwork arm64e /System/Library/Frameworks/CFNetwork.framework/CFNetwork 0x19b497000 - 0x19b873fff CFNetwork arm64e /System/Library/Frameworks/CFNetwork.framework/CFNetwork Crash 2/iOS 17.4.1 (21E236): 0x18ef9a000 - 0x18f376fff CFNetwork arm64e /System/Library/Frameworks/CFNetwork.framework/CFNetwork 0x18ef9a000 - 0x18f376fff CFNetwork arm64e /System/Library/Frameworks/CFNetwork.framework/CFNetwork With the right UUIDs, both logs symbolicate to this stack: Thread 50 Crashed: 0 CFNetwork 0x000000019b534d2c cookieHeaderSort(CompactCookieHeader const*, CompactCookieHeader const*) (in CFNetwork) + 28 1 CFNetwork 0x000000019b534a1c CompactCookieArray::_mungeCookies(CompactCookieArray co
Jun ’24
Reply to SFSafariViewControllerDelegate method for initialLoadDidRedirectTo not being triggered for subsequent reloads as specified in the docs
[quote='756391021, MichaellisAngi, /thread/756391, /profile/MichaellisAngi'] I am allowing a user to log in with an OAuth 2.0 Provider on the Safari browser and expecting to detect the redirect to continue the flow from the app once their credentials have securely been consumed by the IdP in Safari. [/quote] This API allows you to determine how a shortened or obscured URL might unfurl, but we intentionally restrict the returned URLs to preserve user privacy. From the use case you describe, I think you'd be better served using ASWebAuthenticationSession, as there really are not hard guarantees here. Specifically we shipped a new API for ASWebAuthenticationSession which allows specifying an https callback. let session = ASWebAuthenticationSession( url: URL(string: https://example.com/signIn)!, callback: .https(host: mycoolsite.com, path: /auth) // New API ) { callbackURL, error in guard let callbackURL else { return } signIn(using: callbackURL) } session.presentationContextProvider =
Topic: Safari & Web SubTopic: General Tags:
Jun ’24
Reply to IS anyone using ASWebAuthenticationSession with matchesURL method?
If you're adopting ASWebAuthenticationSession for signing in to your app, you shouldn't need to call matchesURL() (except maybe for debugging purposes). That method exists mainly for web browsers that implement handling of ASWebAuthenticationSession requests. To use ASWebAuthenticationSession for signing in, you probably want something like let session = ASWebAuthenticationSession(url: URL(string: https://example.com/signIn)!, callback: .https(host: mycoolsite.com, path: /auth)) { callbackURL, error in guard let callbackURL else { ... } finishMySignIn(with: callbackURL) } session.presentationContextProvider = presentationContextProvider session.start() This will open https://example.com/signIn in a browser context, and watch for a redirect to a URL that starts with https://mycoolsite.com/auth. When a page matching that URL gets loaded, you'll get the full URL in the callbackURL argument, which should have the necessary auth tokens. Note that for custom schemes, there's no n
Topic: App & System Services SubTopic: Core OS Tags:
May ’24