I'm trying to use ASWebAuthenticationSession on macOS but there is a weird crash and I have no idea what to do.
It looks like there is a main thread check in a framework code that I have no control over.
Any help would be appreciated.
Thank you in advance.
The stack of crashed thread has no symbols, even for supposedly my code in OAuthClient.authenticate.
macOS 15.4.1 (24E263)
Xcode Version 16.3 (16E140)
Thread 11: EXC_BREAKPOINT (code=1, subcode=0x10039bb04)
Thread 12 Queue : com.apple.NSXPCConnection.m-user.com.apple.SafariLaunchAgent (serial)
#0 0x0000000100b17b04 in _dispatch_assert_queue_fail ()
#1 0x0000000100b52834 in dispatch_assert_queue$V2.cold.1 ()
#2 0x0000000100b17a88 in dispatch_assert_queue ()
#3 0x000000027db5f3e8 in swift_task_isCurrentExecutorWithFlagsImpl ()
#4 0x00000001022c7754 in closure #1 in closure #1 in OAuthClient.authenticate() ()
#5 0x00000001022d0c98 in thunk for @escaping @callee_guaranteed (@in_guaranteed URL?, @guaranteed Error?) -> () ()
#6 0x00000001c7215a34 in __102-[ASWebAuthenticationSession initWithURL:callback:usingEphemeralSession:jitEnabled:completionHandler:]_block_invoke ()
#7 0x00000001c72163d0 in -[ASWebAuthenticationSession _endSessionWithCallbackURL:error:] ()
#8 0x00000001c7215fc0 in __43-[ASWebAuthenticationSession _startDryRun:]_block_invoke_2 ()
#9 0x0000000194e315f4 in __invoking___ ()
#10 0x0000000194e31484 in -[NSInvocation invoke] ()
#11 0x00000001960fd644 in __NSXPCCONNECTION_IS_CALLING_OUT_TO_REPLY_BLOCK__ ()
#12 0x00000001960fbe40 in -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] ()
#13 0x00000001960fb798 in __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_3 ()
#14 0x0000000194a6ef18 in _xpc_connection_reply_callout ()
#15 0x0000000194a6ee08 in _xpc_connection_call_reply_async ()
#16 0x0000000100b3130c in _dispatch_client_callout3_a ()
#17 0x0000000100b362f8 in _dispatch_mach_msg_async_reply_invoke ()
#18 0x0000000100b1d3a8 in _dispatch_lane_serial_drain ()
#19 0x0000000100b1e46c in _dispatch_lane_invoke ()
#20 0x0000000100b2bfbc in _dispatch_root_queue_drain_deferred_wlh ()
#21 0x0000000100b2b414 in _dispatch_workloop_worker_thread ()
#22 0x0000000100c0379c in _pthread_wqthread ()
My code:
@MainActor
func authenticate() async throws {
let authURL = api.authorizationURL(
scopes: scopes,
state: state,
redirectURI: redirectURI
)
let authorizationCodeURL: URL = try await withUnsafeThrowingContinuation { c in
let session = ASWebAuthenticationSession(url: authURL, callback: .customScheme(redirectScheme)) { url, error in
guard let url = url else {
c.resume(throwing: error ?? Error.unknownError("Failed to get authorization code"))
return
}
c.resume(returning: url)
}
session.presentationContextProvider = presentationContextProvider
session.start()
}
let authorizationCode = try codeFromAuthorizationURL(authorizationCodeURL)
(storedAccessToken, storedRefreshToken) = try await getTokens(authorizationCode: authorizationCode)
}
Here is disassembly of the crashed function.
libdispatch.dylib`_dispatch_assert_queue_fail:
0x10067fa8c <+0>: pacibsp
0x10067fa90 <+4>: sub sp, sp, #0x50
0x10067fa94 <+8>: stp x20, x19, [sp, #0x30]
0x10067fa98 <+12>: stp x29, x30, [sp, #0x40]
0x10067fa9c <+16>: add x29, sp, #0x40
0x10067faa0 <+20>: adrp x8, 71
0x10067faa4 <+24>: add x8, x8, #0x951 ; "not "
0x10067faa8 <+28>: adrp x9, 70
0x10067faac <+32>: add x9, x9, #0x16b ; ""
0x10067fab0 <+36>: stur xzr, [x29, #-0x18]
0x10067fab4 <+40>: cmp w1, #0x0
0x10067fab8 <+44>: csel x8, x9, x8, ne
0x10067fabc <+48>: ldr x10, [x0, #0x48]
0x10067fac0 <+52>: cmp x10, #0x0
0x10067fac4 <+56>: csel x9, x9, x10, eq
0x10067fac8 <+60>: stp x9, x0, [sp, #0x10]
0x10067facc <+64>: adrp x9, 71
0x10067fad0 <+68>: add x9, x9, #0x920 ; "BUG IN CLIENT OF LIBDISPATCH: Assertion failed: "
0x10067fad4 <+72>: stp x9, x8, [sp]
0x10067fad8 <+76>: adrp x1, 71
0x10067fadc <+80>: add x1, x1, #0x8eb ; "%sBlock was %sexpected to execute on queue [%s (%p)]"
0x10067fae0 <+84>: sub x0, x29, #0x18
0x10067fae4 <+88>: bl 0x1006c258c ; symbol stub for: asprintf
0x10067fae8 <+92>: ldur x19, [x29, #-0x18]
0x10067faec <+96>: str x19, [sp]
0x10067faf0 <+100>: adrp x0, 71
0x10067faf4 <+104>: add x0, x0, #0x956 ; "%s"
0x10067faf8 <+108>: bl 0x1006b7b64 ; _dispatch_log
0x10067fafc <+112>: adrp x8, 108
0x10067fb00 <+116>: str x19, [x8, #0x2a8]
-> 0x10067fb04 <+120>: brk #0x1
Prioritize user privacy and data security in your app. Discuss best practices for data handling, user consent, and security measures to protect user information.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
I’m currently implementing App Attest attestation validation on the development server.
However, I’m receiving a 403 Forbidden response when I POST a CBOR-encoded payload to the following endpoint:
curl -X POST
-H "Content-Type: application/cbor"
--data-binary @payload.cbor
'https://data-development.appattest.apple.com'
Here’s how I’m generating the CBOR payload in Java:
Map<String, Object> payload = new HashMap<>();
payload.put("attestation", attestationBytes); // byte[] from DCAppAttestService
payload.put("clientDataHash", clientDataHash); // SHA-256 hash of the challenge (byte[])
payload.put("keyId", keyIdBytes); // Base64-decoded keyId (byte[])
payload.put("appId", TEAM_ID + "." + BUNDLE_ID); // e.g., "ABCDE12345.com.example.app"
ObjectMapper cborMapper = new ObjectMapper(new CBORFactory());
byte[] cborBody = cborMapper.writeValueAsBytes(payload);
I’m unsure whether the endpoint is rejecting the payload format or if the endpoint itself is incorrect for this stage.
I’d appreciate clarification on the following:
1. Is https://data-development.appattest.apple.com the correct endpoint for key attestation in a development environment?
2. Should this endpoint accept CBOR-encoded payloads, or is it only for JSON-based assertion validation?
3. Is there a current official Apple documentation that lists:
• the correct URLs for key attestation and assertion validation (production and development),
• or any server-side example code (e.g., Java, Python) for handling attestation/validation on the backend?
So far, I couldn’t find an official document that explicitly describes the expected HTTP endpoints for these operations.
If there’s a newer guide or updated API reference, I’d appreciate a link.
Thanks in advance for your help.
I would like to confirm about fraud prevention using Device Check when publishing multiple apps.
If the Team ID and Key ID are the same, will the values be shared across all apps with Device Check?
With Device Check, only two keys can be created per developer account, and these two are primarily intended for key renewal in case of a leak, rather than for assigning different keys to each app, correct?
If both 1 and 2 are correct, does that mean that Device Check should not be used to manage "one-time-only rewards per device" when offering them across multiple apps?
Thank you very much for your confirmation.
I no longer have an app on the store. I do have an apple books account on the same login but there's no need for me to have the appstore connect account or whatever you call it and keep getting notifications when I don't have an app, don't want an app, will never do another app.
Topic:
Privacy & Security
SubTopic:
Sign in with Apple
Please correct the following issues and upload a new binary to App Store Connect.
ITMS-91061: Missing privacy manifest - Your app includes “Frameworks/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics”, which includes FirebaseCoreDiagnostics, an SDK that was identified in the documentation as a commonly used third-party SDK. If a new app includes a commonly used third-party SDK, or an app update adds a new commonly used third-party SDK, the SDK must include a privacy manifest file. Please contact the provider of the SDK that includes this file to get an updated SDK version with a privacy manifest. For more details about this policy, including a list of SDKs that are required to include signatures and manifests, visit: https://developer.apple.com/support/third-party-SDK-requirements.
ITMS-91061: Missing privacy manifest - Your app includes “Frameworks/FBLPromises.framework/FBLPromises”, which includes FBLPromises, an SDK that was identified in the documentation as a commonly used third-party SDK. If a new app includes a commonly used third-party SDK, or an app update adds a new commonly used third-party SDK, the SDK must include a privacy manifest file. Please contact the provider of the SDK that includes this file to get an updated SDK version with a privacy manifest. For more details about this policy, including a list of SDKs that are required to include signatures and manifests, visit: https://developer.apple.com/support/third-party-SDK-requirements.
ITMS-91061: Missing privacy manifest - Your app includes “Frameworks/GoogleDataTransport.framework/GoogleDataTransport”, which includes GoogleDataTransport, an SDK that was identified in the documentation as a commonly used third-party SDK. If a new app includes a commonly used third-party SDK, or an app update adds a new commonly used third-party SDK, the SDK must include a privacy manifest file. Please contact the provider of the SDK that includes this file to get an updated SDK version with a privacy manifest. For more details about this policy, including a list of SDKs that are required to include signatures and manifests, visit: https://developer.apple.com/support/third-party-SDK-requirements.
our app is .NET MAUI app so we already addressed this by adding privacyinfo.xcprivacy privacy manifest under platform/ios/resources but still get flagged for this
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
</dict>
</plist>
Hey, there are plans to design a government app. When a citizen will login they will see their passport, driving license etc...
What is the solution of avoiding mandatory in-app user data deletion?
I’m considering storing some sensitive information in the userID field of a passkey, as described in the createCredentialRegistrationRequest method.(link to method).
I'm aware of the largeBlob extension introduced in iOS 17+, but it doesn't meet my needs since I want to create a cross-platform passkey that can be used across various devices — and currently, not many devices support the largeBlob extension.
According to W3C documentation, the userID field is not considered private information and can be displayed to the user without requiring a verification process. Based on my understanding, it's also not encrypted, which means it might be accessible with physical access to the device.
So here are my questions:
How do Apple devices (especially iPhones) handle the userID field in their authenticators?
Is it possible to access the userID without user verification, as permitted by the W3C specification?
Are there any alternative methods to access the userID value stored in a passkey on Apple devices?
Topic:
Privacy & Security
SubTopic:
General
Tags:
Passkeys in iCloud Keychain
Authentication Services
override func prepareInterface(forPasskeyRegistration registrationRequest: any ASCredentialRequest)
int this function how can i get the "challenge" from user agent, the params "challenge" need to be used in webauthn navigator.credentials.create
I have add my domani and email address to Configure Sign in with Apple for Email Communication (https://developer.apple.com/account/resources/services/configure)
and it pass SPF already but when it send from server that i setup is had "Error Description : Permanament error. Please do not try again, according to the information returned by the other party to confirm the specific cause of the error. Cause:550 5.1.1 : unauthorized sender"
a mail service is on Alibaba Cloud the email that i want to sending to is ending with @privaterelay.appleid.com
it that have any solve problem or i missing any thing else ?
Hi everyone,
I'm developing an iOS app using the AppsFlyer SDK. I understand that starting with iOS 14.5, if a user denies the App Tracking Transparency (ATT) permission, we are not allowed to access the IDFA or perform cross-app tracking.
However, I’d like to clarify which in-app events are still legally and technically safe to send when the user denies ATT permission.
Specifically, I want to know:
Is it acceptable to send events like onboarding_completed, paywall_viewed, subscription_started, subscribe, subscribe_price, or app_opened if they are not linked to IDFA or any form of user tracking?
Would sending such internal behavioral events (used purely for SKAdNetwork performance tracking or in-app analytics) violate Apple’s privacy policy if no device identifiers are attached?
Additionally, if these events are sent in fully anonymous form (i.e., not associated with IDFA, user ID, email, or any identifiable metadata), does Apple still consider this a privacy concern? In other words, can onboarding_completed, paywall_viewed, subsribe, subscribe_price, etc., be sent in anonymous format without violating ATT policies?
Are there any official Apple guidelines or best practices that outline what types of events are considered compliant in the absence of ATT consent?
My goal is to remain 100% compliant with Apple’s policies while still analyzing meaningful user behavior to improve the in-app experience.
Any clarification or pointers to documentation would be greatly appreciated.
Thanks in advance!
I'm currently working on a project in Swift where I need to digitally sign a PDF file. I have the following resources available:
Private Key stored in the iOS Keychain with a tag. Public Key also stored in the iOS Keychain with a tag. A valid certificate stored as a PEM string. I need to digitally sign a PDF file with the above keys and certificate, but I'm struggling to find a clear and straightforward example or guidance on how to achieve this in Swift.
Specifically, I’m looking for help with:
Creating the digital signature using the private key and certificate. Embedding this signature into the PDF file. Any considerations I should be aware of regarding the format of the signed PDF (e.g., CMS, PKCS7, etc.). If anyone has experience with digitally signing PDFs in Swift, I would greatly appreciate your guidance or code examples.
Thank you in advance!
Hi Community,
We've implemented Sign In with Apple in our application. Our domains are properly registered in the developer console, but we're experiencing inconsistent email functionality with Apple's privacy email service.
Some domains work correctly while others show delivery problems, even though all domains have identical configurations. Apple's console displays green verification status for all domains, yet testing reveals that emails to privacy-protected accounts don't arrive as expected.
We're using SendGrid as our email service provider, and all domains have valid authentication records (SPF, DKIM, DMARC) in place.
Has anyone encountered similar inconsistencies with Apple's privacy email service? Would appreciate any configuration tips or troubleshooting guidance.
Thanks.
General:
Forums topic: Privacy & Security
Apple Platform Security support document
Developer > Security
Enabling enhanced security for your app documentation article
Creating enhanced security helper extensions documentation article
Security Audit Thoughts forums post
Cryptography:
Forums tags: Security, Apple CryptoKit
Security framework documentation
Apple CryptoKit framework documentation
Common Crypto man pages — For the full list of pages, run:
% man -k 3cc
For more information about man pages, see Reading UNIX Manual Pages.
On Cryptographic Key Formats forums post
SecItem attributes for keys forums post
CryptoCompatibility sample code
Keychain:
Forums tags: Security
Security > Keychain Items documentation
TN3137 On Mac keychain APIs and implementations
SecItem Fundamentals forums post
SecItem Pitfalls and Best Practices forums post
Investigating hard-to-reproduce keychain problems forums post
App ID Prefix Change and Keychain Access forums post
Smart cards and other secure tokens:
Forums tag: CryptoTokenKit
CryptoTokenKit framework documentation
Mac-specific resources:
Forums tags: Security Foundation, Security Interface
Security Foundation framework documentation
Security Interface framework documentation
BSD Privilege Escalation on macOS
Related:
Networking Resources — This covers high-level network security, including HTTPS and TLS.
Network Extension Resources — This covers low-level network security, including VPN and content filters.
Code Signing Resources
Notarisation Resources
Trusted Execution Resources — This includes Gatekeeper.
App Sandbox Resources
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Hi,
I am developing a Platform SSO in order to have integrated with our IdP, which I am also adapting to provide the right endpoints for Platform SSO.
I have a few questions about the implementation:
does the client-request-id need to be present on all requests? Is it unique per request, or requests that are bound together like those requesting a nonce and those who will use that nonce should use the same client-request-id?
I am not sure how the loginManager.presentRegistrationViewController works. I'd like to get the user to authenticate to my IdP before device registration. So I am not sure if I should provide my own Webview or something similar or if this method should do something for me;
My idea is to request user authentication once, save the state when performing device registration, so that I avoid asking for user authentication twice when performing user registration. Is this the right way to do it?
How does platform SSO handles tokens? If one application of my IdP requests the authentication on a common OIDC/OAuth2 flow, should I perform some sort of token exchange?
How about SAML? Platform SSO seems to be token-centric, but how does one handle SAML flows? Is it by using WebView as well?
we develop extension "Autofill Credential Provider" function for passkey.
1.first step registe passkey
2.second step authenticate with passkey
step 1 & step 2 has finished and run success with provideCredentialWithoutUserInteraction.
But we want to prepare our interface for use to input password and select passkey what the want. however the func prepareInterfaceToProvideCredential in ASCredentialProviderViewController does call? what i missed? how can i do it?
Hi, preivously on appleid.apple.com, navigating to this page on safari would show the in-app modal to continue with Apple.
Now with account.apple.com, this is not the case. We are not seeing the in-app modal to continue with Apple
Topic:
Privacy & Security
SubTopic:
Sign in with Apple
Tags:
Sign in with Apple REST API
Sign in with Apple
Sign in with Apple JS
Hi,
A certificate imported on macOS 15 using the security command with the "non-exportable" option was imported in an exportable state. I would like to know how to change this certificate to be non-exportable.
Regards,
CTJ
Hi everyone,
I’m developing a multiplayer iOS game that uses Multipeer Connectivity for local peer-to-peer networking. I’d like to display user-assigned device names in the UI to help players identify each other during the connection process. In iOS 16 and later, accessing UIDevice.current.name requires the User-Assigned Device Name Entitlement.
The documentation states that the entitlement is granted for functionality involving “interaction between multiple devices that the same user operates”. My game is strictly multiplayer, with devices owned by different users, not a single user managing multiple devices.
I have a few questions regarding this:
Does the requirement for “devices operated by the same user” definitively exclude multiplayer scenarios where devices belong to different players? Can a Multipeer Connectivity-based game qualify for the entitlement in this case?
If the entitlement is not applicable, is prompting users to enter custom names the recommended approach for identifying devices in a multiplayer UI?
Has anyone successfully obtained this entitlement for a similar multiplayer use case with Multipeer Connectivity?
Thanks in advance.
iOS 18.2 (22C152)
My phone is currently on lockdown mode and I have gotten alerts from Experian that my information is on the dark web as well as having to reset all my accounts. However this has not fixed the issue. Even if I hard factory reset settings etc the root makes its way very shortly after, if not immediately. Though I recently got these notifications and purchased the phone in Feb. 2024 the has been an ongoing issue for a few years. I can elaborate if needed. To make it short I have a reinstalled root on my phone. Apple nor Spectrum (who I have my phone with) have been able to assist with this issue. I have been able to clarify this ”hijacking” with the Geek Squad who didn’t want their legal team involved when asking for a report so the PD can do an internal cyber investigation. So, I’ve just lived with it.
Let me know what your thoughts to resolve this issue would be before spending thousands to find a resolution on my own.
Side note before asked: what I’ve been told may be it’s ”gateway” is via “DNS hijacking” with WiFi or internally hotspot. I can also elaborate if needed-I’m not a web developer, however I do know where this issue stems from whom has their masters in such industry as well as 30 years experience. It’s annoying and inconvenient at this point and I’m looking for clarity, resolution and if no justice for the criminal then liability. thank you!
please refrain from saying “APpLe CaNt bE hiJaCked“ ..
Hi team, if I log into my app on Safari and try to enroll/challenge MFA security key option, I will be able to see this pop-up that gives me the option to pick either passkeys or external security keys
However, my team member who's using the same version of safari, can only see the external security key option
Why is this?
Topic:
Privacy & Security
SubTopic:
General
Tags:
Passkeys in iCloud Keychain
Authentication Services
Safari