I use activeInputModes in my app. I require the users to use English keyboard on one view controller in my app. At that page, I access the activeInputModes and return the English system keyboard. I don't customize the keyboard. Which one should I choose?
In your NSPrivacyAccessedAPITypeReasons array, supply the relevant values from the list below.
3EC4.1
Declare this reason if your app is a custom keyboard app, and you access this API category to determine the keyboards that are active on the device.
Providing a systemwide custom keyboard to the user must be the primary functionality of the app.
Information accessed for this reason, or any derived information, may not be sent off-device.
54BD.1
Declare this reason to access active keyboard information to present the correct customized user interface to the person using the device. The app must have text fields for entering or editing text and must behave differently based on active keyboards in a way that is observable to users.
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
For starters, I save this IPS in my Files app and the next day permissions were no longer available for me to copy or duplicate. This is a brand new iPhone from Apple. It is a 14 Pro Max any help would be appreciated.
{
SharingViewService-2024-10-15.txt
The sharingview ips
Topic:
Privacy & Security
SubTopic:
General
I am getting issue on my application that my device is jailbroken security message I updated my device 18.2 what the solution
we can get token but when send to verity from apple. it reture Error : {"responseCode":"400","responseMessage":"Missing or incorrectly formatted device token payload"}
Issue Summary
I'm encountering a DCError.invalidInput error when calling DCAppAttestService.shared.generateAssertion() in my App Attest implementation. This issue affects only a small subset of users - the majority of users can successfully complete both attestation and assertion flows without any issues. According to Apple Engineer feedback, there might be a small implementation issue in my code.
Key Observations
Success Rate: ~95% of users complete the flow successfully
Failure Pattern: The remaining ~5% consistently fail at assertion generation
Key Length: Logs show key length of 44 characters for both successful and failing cases
Consistency: Users who experience the error tend to experience it consistently
Platform: Issue observed across different iOS versions and device types
Environment
iOS App Attest implementation
Using DCAppAttestService for both attestation and assertion
Custom relying party server communication
Issue affects ~5% of users consistently
Key Implementation Details
1. Attestation Flow (Working)
The attestation process works correctly:
// Generate key and attest (successful for all users)
self.attestService.generateKey { keyId, keyIdError in
guard keyIdError == nil, let keyId = keyId else {
return completionHandler(.failure(.dcError(keyIdError as! DCError)))
}
// Note: keyId length is consistently 44 characters for both successful and failing users
// Attest key with Apple servers
self.attestKey(keyId, clientData: clientData) { result in
// ... verification with RP server
// Key is successfully stored for ALL users (including those who later fail at assertion)
}
}
2. Assertion Flow (Failing for ~5% of Users with invalidInput)
The assertion generation fails for a consistent subset of users:
// Get assertion data from RP server
self.assertRelyingParty.getAssertionData(kid, with: data) { result in
switch result {
case .success(let receivedData):
let session = receivedData.session
let clientData = receivedData.clientData
let hash = clientData.toSHA256() // SHA256 hash of client data
// THIS CALL FAILS WITH invalidInput for ~5% of users
// Same keyId (44 chars) that worked for attestation
self.attestService.generateAssertion(kid, clientDataHash: hash) { assertion, err in
guard err == nil, let assertion = assertion else {
// Error: DCError.invalidInput
if let err = err as? DCError, err.code == .invalidKey {
return reattestAndAssert(.invalidKey, completionHandler)
} else {
return completionHandler(.failure(.dcError(err as! DCError)))
}
}
// ... verification logic
}
}
}
3. Client Data Structure
Client data JSON structure (identical for successful and failing users):
// For attestation (works for all users)
let clientData = ["challenge": receivedData.challenge]
// For assertion (fails for ~5% of users with same structure)
var clientData = ["challenge": receivedData.challenge]
if let data = data { // Additional data for assertion
clientData["account"] = data["account"]
clientData["amount"] = data["amount"]
}
4. SHA256 Hash Implementation
extension Data {
public func toSHA256() -> Data {
return Data(SHA256.hash(data: self))
}
}
5. Key Storage Implementation
Using UserDefaults for key storage (works consistently for all users):
private let keyStorageTag = "app-attest-keyid"
func setKey(_ keyId: String) -> Result<(), KeyStorageError> {
UserDefaults.standard.set(keyId, forKey: keyStorageTag)
return .success(())
}
func getKey() -> Result<String?, KeyStorageError> {
let keyId = UserDefaults.standard.string(forKey: keyStorageTag)
return .success(keyId)
}
Questions
User-Specific Factors: Since this affects only ~5% of users consistently, could there be device-specific, iOS version-specific, or account-specific factors that cause invalidInput?
Key State Validation: Is there any way to validate the state of an attested key before calling generateAssertion()? The key length (44 chars) appears normal for both successful and failing cases.
Keychain vs UserDefaults: Could the issue be related to using UserDefaults instead of Keychain for key storage? Though this works for 95% of users.
Race Conditions: Could there be subtle race conditions or timing issues that only affect certain users/devices?
Error Recovery: Is there a recommended way to handle this error? Should we attempt re-attestation for these users?
Additional Context & Debugging Attempts
Consistent Failure: Users who experience this error typically experience it on every attempt
Key Validation: Both successful and failing users have identical key formats (44 character strings)
Device Diversity: Issue observed across different device models and iOS versions
Server Logs: Our server successfully provides challenges and processes attestation for all users
Re-attestation: Forcing re-attestation sometimes resolves the issue temporarily, but it often recurs
The fact that 95% of users succeed with identical code suggests there might be some environmental or device-specific factor that we're not accounting for. Any insights into what could cause invalidInput for a subset of users would be invaluable.
I am working on a personal use app, to transcribe audio files. I have over 1000 Voice Memos of ideas for a dog training app and book, recorded while... walking dogs, of course.
I seem to not have the built in transcription option, either because Sonoma doesn't support it or my region doesn't, but I have learned a lot of Swift building an app that works great fort files in a folder in Documents.
I have also found the path to to all the Voice Memo recordings. But when I try to read the contents of the folder to build the queue for transcription I get The file “Recordings” couldn’t be opened because you don’t have permission to view it.
I expected this to be locked down, and some searching brought me to this and I have added Access User Selected Files (Read Only) = YES to the entitlements file, but I am not seeing where in the TARGETS editor I would assign com.apple.security.files.user-selected.read-only. If I add it as a key under info I don't get a popup to select, either in Xcode or when running the app. If I try to add that key to the entitlements file it doesn't allow for selection either.
I am sure I am just missing something in the documentation, likely as a result of being an Xcode & Swift noob. So, if I CAN do this and I am just missing something, can someone point the way? And if a folder inside another app is just verboten, manually copying those files to a documents folder for processing won't be the end of the world.
I am trying to implement a login page in SwiftUI for an idp that relies on passkeys only, following the sample code from the food truck app.
The registration of a new passkey works fine but when it comes to signing in, ASAuthorizationPlatformPublicKeyCredentialProvider().createCredentialAssertionRequest returns a signature that cannot be verified by the server.
On safari (and other browsers) the signing in&up process works fine and additionally, a passkey registered from the swift app works on the web, which leads me to believe there is an issue in the AuthenticationServices framework as every other steps works without any problem.
The verification of the signature happens on the server side (after several validation steps of the other parameters) with WebCrypto.subtle.verify(verifyAlgorithm, key, signature, data);
With the data argument being a concat of the clientDataJSON and the authenticatorData and for an apple authenticator, the key argument (which is the public key stored by the server) is an EC2 key with the following verifyAlgorithm argument:
verifyAlgorithm = {
name: 'ECDSA',
hash: { name: SHA-256 },
};
After carefully analyzing multiple responses, coming both from the app and safari, either on iOS or macOS, I can safely say that the ASAuthorizationResult.passkeyAssertion returns the expected values for:
rawAuthenticatorData
rawClientDataJSON
credentialID
userID
Which all match the expected values during the server-side validation. The only remaining value from the ASAuthorizationResult.passkeyAssertion is the signature, which as mentioned above, is invalid when verified by the server.
I already submitted a bug report (FB15113372) as well as a DTS request, but haven’t received any feedback yet.
In order to further narrow down the problem, I replicated the signature verification process in a sage notebook. I got the same result: the signature produced in Safari is fine, but the one from the Swift app is invalid. I collected some thoughts of potential issues in this notebook, but I still haven’t been able to draw a clear conclusion on why does this issue occur.
Hence if anyone has knowledge of this issue or has a similar problem with signature verification, their advice is most welcomed.
Thank you in advance for your help
PS: All the recent tests were made on the latest publicly available OS releases (iOS 18.01, macOS 15.0.1) and Xcode 16.0
Topic:
Privacy & Security
SubTopic:
General
Tags:
Authentication Services
Passkeys in iCloud Keychain
Hello!
I do know apple does not support electron, but I do not think this is an electron related issue, rather something I am doing wrong. I'd be curious to find out why the keychain login is happenning after my app has been signed with the bundleid, entitlements, and provision profile.
Before using the provision profile I did not have this issue, but it is needed for assessments feature.
I'm trying to ship an Electron / macOS desktop app that must run inside Automatic Assessment Configuration. The build signs and notarizes successfully, and assessment mode itself starts on Apple-arm64 machines, but every single launch shows the system dialog that asks to allow access to the "login" keychain. The dialog appears on totally fresh user accounts, so it's not tied to anything I store there.
It has happened ever since I have added the provision profile to the electron builder to finally test assessment out.
entitlements.inherit.plist keys
<key>com.apple.security.cs.allow-jit</key> <true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> <true/>
entitlements.plist keys:
<key>com.apple.security.cs.allow-jit</key> <true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> <true/>
<key>com.apple.developer.automatic-assessment-configuration</key> <true/>
I'm honestly not sure whether the keychain is expected, but I have tried a lot of entitlement combinations to get rid of It. Electron builder is doing the signing, and we manually use the notary tool to notarize but probably irrelevant.
mac: {
notarize: false,
target: 'dir',
entitlements: 'buildResources/entitlements.mac.plist',
provisioningProfile: 'buildResources/xyu.provisionprofile',
entitlementsInherit: 'buildResources/entitlements.mac.inherit.plist',
Any lead is welcome!
Topic:
Privacy & Security
SubTopic:
General
Tags:
Automatic Assessment Configuration
Assessment
Security
Entitlements
Greetings! I want to add my pre-compiled binary of v2ray to my application so I can activate it in background as a proxy and run stuff through it.
I've codesigned it via:
codesign -s - -i production.myproject.v2ray -o runtime --entitlements v2ray.entitlements -f v2ray
Contents of entitlements file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
</plist>
Originally I ran it like this without sandboxing from my main target app:
guard let v2rayPath = Bundle.main.path(forResource: "v2ray", ofType: nil) else {
throw NSError(domain: "ProxyController", code: 1, userInfo: [NSLocalizedDescriptionKey: "V2Ray binary not found in bundle"])
}
let task = Process()
task.executableURL = URL(fileURLWithPath: v2rayPath)
task.arguments = ["-config", configURL.path]
// Redirect output for debugging
let pipe = Pipe()
task.standardOutput = pipe
task.standardError = pipe```
And it ran flawlessly. Now it refuses to start. Any help, pointers or examples of such usage will be greatly appreciated
Hi,
I have a certificate, how can I display the certificate content in my Mac app just like Keychain Access app does. Can I popup the certificate content dialog just like Keychain Access app?
Hi all,
I received the following email from Apple:
ITMS-91061: Missing privacy manifest - Your app includes “Frameworks/share_plus.framework/share_plus”, which includes share_plus, an SDK that was identified in the documentation as a privacy-impacting third-party SDK. Starting February 12, 2025, if a new app includes a privacy-impacting SDK, or an app update adds a new privacy-impacting 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
I use Share Plus version 7.2.2 which does not have privacy manifest file yet but I am currently unable to upgrade it to a newer version since it would then bring a restriction that I should start using Dart version 3 where I am not there yet considering my other dependencies!
So I am wondering what options I have... Will Apple accept my app's new submission if I add this manifest file to my project itself rather than it is being presented in the third-party SDK? Or what else can I do, please?
I am building a MAC app using crypto token. I have previously done this successfully for iPhone.
In iPhone we found if something crashed on the token session while performing a sign (meaning the function wasn't able to return a value) the token or the keychain freezes and stopped returning keychain items at the query for keychain items it will return status 0. The only way to solve this was to reboot the iphone.
In Mac something similar is happening, a crash at internet connection level made the extension get stuck and now event after restarting the mac it does not allow connection
this query
let query: [String:Any] = [kSecAttrAccessGroup as String: kSecAttrAccessGroupToken, kSecAttrKeyClass as String : kSecAttrKeyClassPrivate,kSecClass as String : kSecClassIdentity, kSecReturnAttributes as String : kCFBooleanTrue as Any, kSecReturnRef as String: kCFBooleanTrue as Any, kSecMatchLimit as String: kSecMatchLimitAll, kSecReturnPersistentRef as String: kCFBooleanTrue as Any]
let status = SecItemCopyMatching(query as CFDictionary, &item)
print("Status: (status.description)")
This generates:
Unable to connect to com.intereidas.dniMac.mac.TKExt:DniMac even after retries.
Status: 0
Found items: 0
This does not get fixed after mac restart, how can we make the token extension work again?
Dear Apple Developer Support Team,
We are experiencing a recurring issue with the DeviceCheck API where the following error is being returned:
com.apple.devicecheck.error 0
Upon analyzing our logs, we have noticed that this error occurs significantly more often when users are connected to Wi-Fi networks, compared to mobile networks. This leads us to suspect that there might be a relationship between Wi-Fi configuration and the DeviceCheck service’s ability to generate or validate tokens.
We would like to know:
Is this error code (0) known to be caused by specific types of network behavior or misconfigurations on Wi-Fi networks (e.g., DNS filtering, firewall restrictions, proxy servers)?
Are there any recommended best practices for ensuring reliable DeviceCheck API communication over Wi-Fi networks?
Additionally, could you please clarify what general conditions could trigger this com.apple.devicecheck.error 0? The lack of specific documentation makes debugging this issue difficult from our side.
Any guidance or internal documentation on this error code and its potential causes would be greatly appreciated.
IDE: Xcode 16.3
Looking forward to your support.
Best regards,
I think there's a slight discrepancy between what is being communicated in EndpointSecurity docs, and what is really happening.
For example, consider the description of this event:
https://developer.apple.com/documentation/endpointsecurity/es_event_type_t/es_event_type_notify_truncate?language=objc
"ES_EVENT_TYPE_NOTIFY_TRUNCATE: An identifier for a process that notifies endpoint security that it is truncating a file."
But, it seems that this event is fired up only when truncate(2) is called, not when process truncates a file (which can be done in lots of different ways). But the documentation doesn't even mention that it's only about the truncate(2) call, it's impossible to know.
Another example:
https://developer.apple.com/documentation/endpointsecurity/es_event_type_t/es_event_type_notify_copyfile?language=objc
"ES_EVENT_TYPE_NOTIFY_COPYFILE: An identifier for a process that notifies endpoint security that it is copying a file."
It seems that this event is only called when copyfile(3) syscall is called. But the docs doesn't mention that syscall at all. The wording suggests that the event should be emitted on every file copy operation, which is probably impossible to detect.
I mean, I get that you'd like the docs to be "easy to digest", but I think that such working confuses people. They expect one thing, then they get confusing behavior from ES, because it doesn't match their expectations, and after reaching out to Apple they get concise and clear answer -- but it would be easier for everyone (including Apple devs) when this answer would be included directly in the official docs for the framework.
Dear Apple Team,
I hope this message finds you well.
Recently, while exploring Apple’s open-source resources, I came across some files that appear to contain sensitive information, including private keys. I wanted to reach out to clarify whether these files are intentionally made publicly available or if they might be exposed due to a potential misconfiguration.
Understanding the nature of these files is important, and I would appreciate any guidance you can provide regarding their accessibility and any necessary steps that should be taken to address this matter.
Thank you for your attention to this issue. I look forward to your response.
Topic:
Privacy & Security
SubTopic:
General
Hello Apple ID support,
When a user successfully login with Apple, the apple OAuth will produce a appleIdToken. From my understanding this token is best to not leave the user device. I have two sub-system that can take a appleIdToken and manages the token-refresh separately.
In short:
Apple -> appleIdToken
sub-SystemA(appleIdToken) and sub-systemB(appleIdToken)
sub-SystemA and sub-systemB has two separate token management/refresh
The question:
Is this allowed by the Apple identify server?
Is the usecase of supplying appleIdToken to sub-SystemA and sub-systemB valid?
We are using device certificates for authentication when logging into our web page. After updating an iPhone 12 to iOS 18, the authentication process takes up to two minutes to respond.
Upon investigating IIS, it was found that the certificate is not being presented from the iPhone, resulting in a timeout.
This issue is affecting our operations, and we need a solution urgently.
Could you please advise on how to resolve this?
Hello,
We are working on integrating app integrity verification into our service application, following Apple's App Attest and DeviceCheck guide.
Our server issues a challenge to the client, which then sends the challenge, attestation, and keyId in CBOR format to Apple's App Attest server for verification. However, we are unable to reach both https://attest.apple.com and https://attest.development.apple.com due to network issues.
These attempts have been made from both our internal corporate network and mobile hotspot environments. Despite adjusting DNS settings and other configurations, the issue persists.
Are there alternative methods or solutions to address this problem? Any recommended network configurations or guidelines to successfully connect to Apple's App Attest servers would be greatly appreciated.
Thank you.
I've developed a Endpoint Security system extension, which will be installed in a container APP.
I use XPC to send message from container APP to the ES client, it works fine.
I have developed an Endpoint Security system extension that will be installed in a container app.
I utilize XPC to send messages from the container app to the ES client, and it functions properly. However, when I attempt to send messages from the ES client to the container app, it always displays an error: 'Couldn’t communicate with a helper application.'.
I have removed the sandbox capability of the container app and also employed the same app group for both the ES client and the container app. When an XPC client is connected, I use the following code in the ES client to establish two-way communication.
- (BOOL)listener:(NSXPCListener *)listener shouldAcceptNewConnection:(NSXPCConnection *)newConnection {
newConnection.exportedInterface = [NSXPCInterface interfaceWithProtocol:@protocol(NXFileGuardXPCProtocol)];
NXFileGuardXPCService *xpcService = [NXFileGuardXPCService sharedInstance];
newConnection.exportedObject = xpcService;
// To APP container client (As remote interface)
newConnection.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(NXFileGuardXPCClientProtocol)];
[newConnection activate];
self.containerAPPConnection = newConnection;
return YES;
}
But it always fails. How can I deal with this error?
Hi there,
I'm trying to use SFAuthorizationPluginView in order to show some fields in the login screen, have the user click the arrow, then continue to show more fields as a second step of authentication. How can I accomplish this?
Register multiple SecurityAgentPlugins each with their own mechanism and nib?
Some how get MacOS to call my SFAuthorizationPluginView::view() and return a new view?
Manually remove text boxes and put in new ones when button is pressed
I don't believe 1 works, for the second mechanism ended up calling the first mechanism's view's view()
Cheers,
-Ken