hey everyone.!!
In one of my macOS projects I am trying to fetch the files and folders available on "Desktop" and "Document" folder and trying to showing it on collection view inside the my project, but when I try to fetch the files and folder of desktop and document, I am not able to fetch it. But if i try it by setting the entitlements False, I am able to fetch it.
If any have face the similar issue, or have an alternative it please suggest.
NOTE:- I have tried implementing it using NSOpenPanel and it works, but it lowers the user experience.
General
RSS for tagPrioritize 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
I was wondering if anyone had experience with Managed Device Profiles on iPad to be able to answer a quick question regarding passcode reset. We are using Microsoft Intune to manage our fleet of iPads that our store employees will use on an Ad-Hoc basis. When a user logs into an iPad for the day, we are issuing a resetPasscode command to the MicrosoftGraph specifying that device ID. We are getting a successful response to the iPad itself. But the device is allowing the user 1 hour of free time to dismiss the reset passcode dialogue. Which enables them to use the iPad unprotected for up to an hour, which is not what we want. Does anyone know of any way to force the user to select a passcode immediately? I know this is a device side restriction. But is there anything apple can do to help us in this instance, since our MDM profile can't close this time window on the Intune side?
Topic:
Privacy & Security
SubTopic:
General
AFAIU a new screen capture notification was added within the Control Center in Sequoia 15.2, see attached examples:
My question is whether there is some way to suppress this notification preferably via an MDM configuration profile.
See also https://discussions.apple.com/thread/255886645?sortBy=rank for more information.
Thanks,
Doron.
Pretty much the headline. the func transactionHistory() needs to return the transaction location. This seems so rudimentary, yet it is missing from the docs. Unless I'm missing something, please add this feature or point me in the right direction.
Alternatively, is there a way for my app to get notified of the transaction immediately as it happens? I have to get transactions historically which leaves me with no way to determine where they happened in the past.
Topic:
Privacy & Security
SubTopic:
General
I've tried all kinds of ways to get a SecKeyRef from the .p8 file I downloaded from my App Store Connect account. The key itself looks OK, as openssl gives this result:
openssl asn1parse -in 359UpAdminKey.p8
0:d=0 hl=3 l= 147 cons: SEQUENCE
3:d=1 hl=2 l= 1 prim: INTEGER :00
6:d=1 hl=2 l= 19 cons: SEQUENCE
8:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey
17:d=2 hl=2 l= 8 prim: OBJECT :prime256v1
27:d=1 hl=2 l= 121 prim: OCTET STRING [HEX DUMP]:30...
My method for creating the key is:
'- (SecKeyRef)privateKeyFromP8:(NSURL *)p8FileURL error:(NSError **)error {
// Read the .p8 file
NSData *p8Data = [NSData dataWithContentsOfURL:p8FileURL options:0 error:error];
if (!p8Data) {
return NULL;
}
// Convert P8 to base64 string, removing header/footer
NSString *p8String = [[NSString alloc] initWithData:p8Data encoding:NSUTF8StringEncoding];
NSArray *lines = [p8String componentsSeparatedByString:@"\n"];
NSMutableString *base64String = [NSMutableString string];
for (NSString *line in lines) {
if (![line containsString:@"PRIVATE KEY"]) {
[base64String appendString:line];
}
}
// Decode base64 to raw key data
NSData *keyData = [[NSData alloc] initWithBase64EncodedString:base64String options:0];
if (!keyData) {
if (error) {
*error = [NSError errorWithDomain:@"P8ImportError"
code:1
userInfo:@{NSLocalizedDescriptionKey: @"Failed to decode base64 data"}];
}
return NULL;
}
// Set up key parameters
NSDictionary *attributes = @{
(__bridge NSString *)kSecAttrKeyType: (__bridge NSString *)kSecAttrKeyTypeECSECPrimeRandom,
(__bridge NSString *)kSecAttrKeyClass: (__bridge NSString *)kSecAttrKeyClassPrivate,
(__bridge NSString *)kSecAttrKeySizeInBits: @256
};
// Create SecKeyRef from the raw key data
CFErrorRef keyError = NULL;
SecKeyRef privateKey = SecKeyCreateWithData((__bridge CFDataRef)p8Data,
(__bridge CFDictionaryRef)attributes,
&keyError);
if (!privateKey && keyError) {
*error = (__bridge_transfer NSError *)keyError;
NSError *bridgeError = (__bridge NSError *)keyError;
if (error) {
*error = bridgeError; // Pass the bridged error back to the caller
}
NSLog(@"Key Error: %@", bridgeError.localizedDescription);
}
return privateKey;
}
`
I get this error from SecKeyCreateWithData
The operation couldn’t be completed. (OSStatus error -50 - EC private key creation from data failed)
Filed a DTS incident, but they won't be back until after the New Year.
I've tried all kinds of things. Various AI chatbots, etc. Nothing seems to be working. I'm sure the problem is something elementary, but have spent hours on this with no luck.
Help, please.
Not getting ASCredentialServiceIdentifier in func prepareOneTimeCodeCredentialList(for serviceIdentifiers: [ASCredentialServiceIdentifier]) when trying to use ASCredentialProviderViewController for autofilling one time codes in iOS 18.
Hello,
We plan to remove our app from the App Store. This post aims to determine whether our company can rely on Private Relay to compensate our customers.
Our Challenge: Gift Card Refunds with Private Relay
Some customers purchased gift cards through our app using Apple's "Private Relay" during account creation. To process refunds, we need a way to identify these customers. Our system relies on email addresses, which are masked by Private Relay.
Potential Solution: Apps Using Apple ID
We're exploring "Apps Using Apple ID" as a possible solution for customers to share their Private Relay addresses for refund purposes.
Under what circumstances will an app cease to appear in the "Apps Using Apple ID" list?
What conditions must be met to initiate a new Private Relay connection for the same user and application? For example, would using the same Apple account to sign into the app on a different device trigger a new Private Relay?
Thank you for your help!
Hi Team,
There is situation in which I want to implement session Resumption in IOS. I am using Network Framework but I am unable to find a way, how to enable the resumption . It will more beneficial for me if you guys can help me in that.
Regards,
E aí pessoal, tudo certo?
Estou desenvolvendo um app com React Native no front-end e Node.js no back-end, usando o Firebase como banco de dados (e possivelmente para autenticação também, dependendo da solução). Preciso implementar o "Sign in with Apple" e estou com algumas dúvidas em como integrar tudo isso.
A ideia é: o usuário clica no botão "Entrar com a Apple" no app (React Native), o backend (Node.js) processa a autenticação com a Apple e, em seguida, armazena as informações necessárias (nome, email, etc.) no Firebase.
Se alguém já trabalhou com essa combinação (React Native, Node.js, Firebase e Sign in with Apple) e puder compartilhar alguma experiência, dicas, exemplos de código ou até mesmo um boilerplate, seria de grande ajuda!
Please help me clarify the current situation regarding the necessity of a privacy manifest file in 3rd party SDKs. It would be nice to have a reply from someone working at Apple, to have a reliable answer.
A quick summery of the events from last year
https://developer.apple.com/support/third-party-SDK-requirements/ : "Starting in spring 2024, you must include the privacy manifest for any SDK listed below when you submit new apps in App Store Connect that include those SDKs, or when you submit an app update that adds one of the listed SDKs as part of the update."
Last autumn, we started receiving warning emails from Apple after initiating app reviews, even when our apps did not have a newly added SDK:
ITMS-91061: Missing privacy manifest - Starting November 12, 2024, 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.
According to this warning message, app updates which do not contain any new SDKs are still not affected.
Since then, at one point in time the deadline changed, as now we have February 12, 2025 in the privacy manifest documentation: https://developer.apple.com/documentation/bundleresources/adding-a-privacy-manifest-to-your-app-or-third-party-sdk
However, this page does not contain any mention of the circumstances, it only states in general that
apps you submit for review in App Store Connect must contain a valid privacy manifest file for a certain number of commonly used third-party SDKs.
My questions
Does the February deadline apply to every app update, even if they do not contain any newly added SDKs? Or does it still affect only the app updates "that adds one of the listed SDKs as part of the update." ? If the former, the 3rd party requirements page should be updated in my opinion. And if the latter, why does the documentation not contain this important piece of information?
We have a basic product which then gets customised for the clients so we upload several different apps based on the same code with the same dependencies. How is it possible that during autumn, Apple sent ITMS-91061: Missing privacy manifest warnings for some of our apps, but did not send it for others? Does Apple not validate all the apps but only some of them randomly? Also, the warning still states that it should be relevant if "an app update adds a new privacy-impacting SDK", but that was not the case for us, we did not add anything newly to our apps - why did we even get these warnings then?
Just in general: when the deadlines change, is there any channel where Apple communicates these, besides the warning emails? I did not see any posts on the Apple Developer site's News page about this February date, I just found it by accident. I don't even remember seeing a notice about the original November deadline, we just started receiving the email warnings without expecting them.
Thank you in advance for anyone sharing an answer.
Hi All,
I have a finder sync extension that passes data back to my main app. It currently writes to a plist file in my group container folder. Since updating to macOS 15, I have been getting this pop-up every time I trigger this writing to the plist after the finder sync extension loads.
This is how I write to the plist from my finder sync extension:
let appGroupDefaults = UserDefaults(suiteName: "group.team_id.Finder-Sync-Extension-Test-Project")
let items = FIFinderSyncController.default().selectedItemURLs()
DispatchQueue.main.async {
let url = items?.first?.absoluteString
var file = items?.first?.lastPathComponent
if let defaults = appGroupDefaults{
defaults.set(url, forKey: "targetURL")
defaults.synchronize()
}
self.showWindow(with: NSExtensionContext())
}
This is how I read the plist from my main app:
if let defaults = UserDefaults(suiteName: "group.team_id.Finder-Sync-Extension-Test-Project") {
defaults.synchronize()
if let clickedUrl = defaults.string(forKey: "targetURL") {
window = NSWindow(contentRect: NSScreen.main?.frame ?? .zero,
styleMask: [.miniaturizable, .closable, .resizable, .titled],
backing: .buffered,
defer: false)
window?.title = "My App"
window?.makeKeyAndOrderFront(nil)
textField.stringValue = clickedUrl
window?.contentView?.addSubview(textField)
}
}
It is fine if this popup happens once and the user's choice gets remembered. I just don't want it to happen every time.
Any help on if this is the correct way to pass data between the finder sync extension and the main app or on how to get macOS to remember the choice of the user would be great.
Thanks,
James
Why does the following code generate a public key that can't be parsed by openssl?
import Security
import CryptoKit
func generateKeys() throws -> (privateKey: SecKey, publicKey: SecKey) {
let query: [String: Any] = [
kSecAttrKeyType as String: kSecAttrKeyTypeECSECPrimeRandom,
kSecAttrKeySizeInBits as String: 256,
kSecAttrIsPermanent as String: false
]
var error: Unmanaged<CFError>?
guard let privateKey = SecKeyCreateRandomKey(query as CFDictionary, &error) else {
throw error!.takeRetainedValue()
}
let publicKey = SecKeyCopyPublicKey(privateKey)!
return (privateKey, publicKey)
}
extension SecKey {
func exportBase64EncodedKey() -> String {
var error: Unmanaged<CFError>?
guard let data = SecKeyCopyExternalRepresentation(self, &error) else {
fatalError("Failed to export key: \(error!.takeRetainedValue())")
}
return (data as Data).base64EncodedString(options: [.lineLength64Characters])
}
}
func printPublicKey() {
let keyPair = try! generateKeys()
let encodedPublicKey = keyPair.publicKey.exportBase64EncodedKey()
var header = "-----BEGIN PUBLIC KEY-----"
var footer = "-----END PUBLIC KEY-----"
var pemKey = "\(header)\n\(encodedPublicKey)\n\(footer)\n"
print(pemKey)
}
printPublicKey()
when parsing the key I get this:
openssl pkey -pubin -in new_public_key.pem -text -noout
Could not find private key of Public Key from new_public_key.pem
404278EC01000000:error:1E08010C:DECODER routines:OSSL_DECODER_from_bio:unsupported:crypto/encode_decode/decoder_lib.c:102:No supported data to decode.
Replacing kSecAttrKeyTypeECSECPrimeRandom with kSecAttrKeyTypeRSA and a bigger key size (e.g. 2048) gives me a working public key that can be parsed by Openssl.
Thanks!
I was in the webview long according to the pictures, and then select "save image" will lead to collapse, I have passed on the info plist add NSPhotoLibraryAddUsageDescription solved it.
Now I have another question, does the last item "query" in the screenshot have a similar problem? Since I couldn't click the button (I don't know why this happened), I couldn't test it on the real machine.
Hi,
I have a question about UIDevice identifierForVendor.
I am distributing 3 apps using an enterprise account. All apps use the same developer account and certificates.
The bundle IDs of the apps are as follows:
com.abc.inhouse.mail
com.abc.searchent
com.abc.noteent
In the Enterprise builds, apps 1 and 2 share the same identifierForVendor (IDFV). However, app 3 has a different IDFV value.
According to Apple documentation, the IDFV is determined based on the bundle ID when distributing through Enterprise.
Why does app 3 have a different IDFV?
Are there any other factors besides the bundle ID that affect the IDFV in Enterprise builds?
Please help me figure this out.
Thank you for your time!
Topic:
Privacy & Security
SubTopic:
General
Hello,
I'm exploring the Secure Enclave APIs, and I'm wondering if it's possible to "cryptographically" determine if a block of data was signed on the Secure Enclave.
When I sign a block of data using the Secure Enclave (which implies using a key pair automatically generated by the enclave) and distribute the public key to others, is there any way to verify if the message was encrypted on it / its private key was generated by it? In other words, what I'm trying to achieve is to make sure that the public key hasn't been tampered with until it reaches its destination (including on-device threats, since otherwise I could've used a normal keychain item, perhaps?).
For the purpose of this example, I'm not necessarily interested in figuring out if the key was signed on a certain device's enclave, but rather on any Secure Enclave. So, using something derived from the enclave's GID Key (described in the Apple Platform Security guide) would work for this.
I was testing an app with AppleSignIn with a Firebase backend and wanted to test account deletion functionality. I was unaware of needing to revoke the token with Apple before proceeding with account deletion. Now, when I try to create a new account with the same appleId email, the token passed to Firebase is invalid and the login fails.
As such, I am blocked from testing my app with authenticated Apple users, so I'm trying to understand what the workaround is.
Thanks in advance!
I am developing an app that uses Sign In with Apple for authentication, and I need to test different scenarios, such as when a user chooses not to share their email.
However, after logging in for the first time, I cannot reset the permissions flow to test again. Even after uninstalling the app, revoking access to the Apple ID in ‘Settings > Apps Using Apple ID,’ and attempting to log in again, only the token (identityToken) is returned, while the full information (email, name, surname) is no longer provided.
This makes it difficult to simulate the initial user behavior, especially when choosing to share or not share their email.
I would like to know:
1. Is there a way to completely reset the permissions flow so I can test as if it were the first time using the same Apple ID?
2. Are there any recommended solutions for development scenarios without needing to create multiple Apple IDs?
Thank you for any guidance on how to proceed.
Description:
I am attempting to use the OpenDirectory API ODRecord.changePassword to change a user's password without needing the old password, given that I have the appropriate permissions. The goal is to ensure that the password change operation bypasses third-party tools such as EDR or eBPF apps that might otherwise intercept commands, as the operation occurs directly via the API.
Problem:
When invoking the OpenDirectory API from a launch daemon with root privileges, I receive the following error message:
Error Domain=com.apple.OpenDirectory Code=4001 "Operation was denied because the current credentials do not have the appropriate privileges."
UserInfo={NSUnderlyingError=0x135907570 {Error Domain=com.apple.OpenDirectory Code=4001 "Credential cannot update user's SecureToken" UserInfo={NSDescription=Credential cannot update user's SecureToken}},
NSLocalizedDescription=Operation was denied because the current credentials do not have the appropriate privileges.,
NSLocalizedFailureReason=Operation was denied because the current credentials do not have the appropriate privileges.}
It seems the error is related to SecureToken, and the underlying issue is that the current credentials (even though they are root-level) do not have the necessary privileges to update the SecureToken status for the user.
Steps I’ve Taken:
Tested the API via a launch daemon running with root privileges.
Ensured that Full Disk Access was granted to the daemon, but this did not resolve the issue.
Request:
Has anyone encountered this specific issue where root privileges are insufficient to update the user password via the OpenDirectory API ?
What additional steps or permissions are required for a user password change?
Is there a specific API or method to elevate the privileges for modifying SecureToken, or a workaround to overcome this limitation?
Any insights or guidance on this issue would be greatly appreciated!
Thank you in advance for your help!
Is there a way to unlock login keychain without using password and with any other authentication factor supported by 3rd party MFA options?
Hi,
We came accross with 2 devices, iPhone 12 and iphone16 pro. the both have same device code.
Both the devices have same apple id and belongs to same user
I had understanding that device codes are unique to device. How this can happen?
Any remediation?
Thanks,
Veena
Topic:
Privacy & Security
SubTopic:
General