Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Reply to Unable to Write to UserDefaults from Widget Extension Despite Correct App Group Configuration
I switched to writing to a file instead and I get the same error: Error Domain=NSCocoaErrorDomain Code=513 You don’t have permission to save the file “testFromWidget.txt” in the folder “B6DF24C2-XXXX-XXXXX-XXX-XXXXXXX. UserInfo={NSFilePath=.../testFromWidget.txt, NSURL=.../testFromWidget.txt, NSUnderlyingError=0x1078790e0 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}}
Aug ’25
Reply to Errors reading not-yet-sync'd iCloud files get cached
I'm not sure what's going on here, but I do have a few comments and questions: First off, are you using coordinated I/O for all of your actual access? The basic point of coordinate I/O is to prevent apps from making I/O calls before the system is actually ready for them to be made, which should make this sort of thing unnecessary: I/O may hang indefinitely, trying to read a file as it is arriving. This one I can work around by running the I/O in a thread created with the POSIX pthread_create and using pthread_cancel to kill it after a timeout. As a general note, I'm very skeptical of any usage of pthread cancellation. Our system's are basically built on two parallel system/IPC architectures (BSD an mach) which have never really been properly integrated. An API like pthread_cancel really only deals with the BSD architecture, which means the consequences to the mach side are... undefined. At a minimum it probably creates mach port leaks and at worst... well, the problem with mach is that the the worst is VERY d
Aug ’25
Errors reading not-yet-sync'd iCloud files get cached
I have an app which uses ubiquitous containers and files in them to share data between devices. It's a bit unusual in that it indexes files in directories the user grants access to, which may or may not exist on a second device - those files are identified by SHA-1 hash. So a second device scanning before iCloud data has fully sync'd can create duplicate references which lead to an unpleasant user experience. To solve this, I store a small binary index in the root of the ubiquitous file container of the shared data, containing all of the known hashes, and as the user proceeds through the onboarding process, a background thread is attempting to prime the ubiquitous container by calling FileManager.default.startDownloadingUbiquitousItemAt() for each expected folder and file in a sane order. This likely creates a situation not anticipated by the iOS/iCloud integration's design, as it means my app has a sort of precognition of files it should not yet know about. In the common case, it works, but there is a corner
1
0
170
Aug ’25
Reply to Drop file not found on MacBook Air
Ok. I tried my user directory and the user directory. Same result: ❌ Échec lors de la copie : Error Domain=NSCocoaErrorDomain Code=4 Le fichier « 2019-BMW-X2-Specs-Build-Sheet.pdf » n’existe pas. UserInfo={NSSourceFilePathErrorKey=/.nofollow/Users/2019-BMW-X2-Specs-Build-Sheet.pdf, NSUserStringVariant=( Copy ), NSDestinationFilePath=/Users/jean-philippegreaux/Library/Containers/jgreaux.gestion-de-comptes/Data/Documents/2025/7/justificatif_88.pdf, NSFilePath=/.nofollow/Users/2019-BMW-X2-Specs-Build-Sheet.pdf, NSURL=file:///.nofollow/Users/2019-BMW-X2-Specs-Build-Sheet.pdf, NSUnderlyingError=0x600001ed9410 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}} ❌ Échec lors de la copie : Error Domain=NSCocoaErrorDomain Code=4 Le fichier « 2019-BMW-X2-Specs-Build-Sheet.pdf » n’existe pas. UserInfo={NSSourceFilePathErrorKey=/Users/jean-philippegreaux/2019-BMW-X2-Specs-Build-Sheet.pdf, NSUserStringVariant=( Copy ), NSDestinationFilePath=/Users/jean-philippegreaux/Library/Containers/jg
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’25
Reply to Issue with CXSetTranslatingCallAction – "Couldn't communicate with a helper application" error
Hi Kevin Elliott, Here I'm adding the exact error message that I have got while requesting callkit transaction (Error?) domain: NSCocoaErrorDomain - code: 4097 { _userInfo = 0x000000012782a220 1 key/value pair { [0] = { key = 0x00000001f9af9c30 NSDebugDescription value = 0x0000000114f76d80 connection to service with pid 144 named com.apple.callkit.callcontrollerhost } } } And error's description is Couldn't communicate with a helper application. Please check and let us know if any further information needed. Thanks & Regards, Kishore
Topic: App & System Services SubTopic: General Tags:
Jul ’25
Reply to Drop file not found on MacBook Air
The error persists in the document folder and on the desktop. Here are the logs when droping from the document folder: Unable to open mach-O at path: default.metallib Error:2 ✅ PDF détecté ❌ Échec lors de la copie : Error Domain=NSCocoaErrorDomain Code=4 Le fichier « Facture - Contrôle Technique - Land Rover Defender - 118V.pdf » n’existe pas. UserInfo={NSSourceFilePathErrorKey=/Users/jean-philippegreaux/Documents/Facture - Contrôle Technique - Land Rover Defender - 118V.pdf, NSUserStringVariant=( Copy ), NSDestinationFilePath=/Users/jean-philippegreaux/Library/Containers/jgreaux.gestion-de-comptes/Data/Documents/2025/7/justificatif_89.pdf, NSFilePath=/Users/jean-philippegreaux/Documents/Facture - Contrôle Technique - Land Rover Defender - 118V.pdf, NSURL=file:///Users/jean-philippegreaux/Documents/Facture%20-%20Contro%CC%82le%20Technique%20-%20Land%20Rover%20Defender%20-%20118V.pdf, NSUnderlyingError=0x600001a37ed0 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}} ❌ Échec du traite
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’25
Reply to Drop file not found on MacBook Air
Thanks for the extra info. I see two errors here: The top-level error is NSCocoaErrorDomain code 4, which is NSFileNoSuchFileError. The underlying error is NSPOSIXErrorDomain code 2, which is ENOENT. Cocoa errors can be a bit ‘squishy’, meaning that the same error can come from a variety different sources. However, the presence of the ENOENT error suggests that this really is a file not found problem of some form. It looks like the source file is in the Downloads folder. That might be important because that folder is protected by MAC [1]. If you use the Finder to move the file to your home directory and then drag the file on to your app, does that work? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] That’s another topic I cover in On File System Permissions.
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’25
Reply to Drop file not found on MacBook Air
Tanks for the answer, The Logs from Xcode (on the Mac Book Air) are the following: 5 Reentrant message: kDragIPCWithinWindow, current message: kDragIPCWithinWindow ✅ PDF détecté ❌ Échec lors de la copie : Error Domain=NSCocoaErrorDomain Code=4 Le fichier « brochure_nissan_eNV200_evalia-2.pdf » n’existe pas. UserInfo={NSSourceFilePathErrorKey=/Users/jean-philippegreaux/Downloads/brochure_nissan_eNV200_evalia-2.pdf, NSUserStringVariant=( Copy ), NSDestinationFilePath=/Users/jean-philippegreaux/Library/Containers/jgreaux.gestion-de-comptes/Data/Documents/2025/7/justificatif_80.pdf, NSFilePath=/Users/jean-philippegreaux/Downloads/brochure_nissan_eNV200_evalia-2.pdf, NSURL=file:///Users/jean-philippegreaux/Downloads/brochure_nissan_eNV200_evalia-2.pdf, NSUnderlyingError=0x600002a8ab80 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}} ❌ Échec du traitement du fichier 5 Reentrant message: kDragIPCCompleted, current message: kDragIPCLeaveApplication ps: what's bothering me is that the issue
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’25
get error with xcode beta3 :decodingFailure(FoundationModels.LanguageModelSession.GenerationError.Context
@Generable enum Breakfast { case waffles case pancakes case bagels case eggs } do { let session = LanguageModelSession() let userInput = I want something sweet. let prompt = Pick the ideal breakfast for request: (userInput) let response = try await session.respond(to: prompt,generating: Breakfast.self) print(response.content) } catch let error { print(error) } i want to test the @Generable demo but get error with below:decodingFailure(FoundationModels.LanguageModelSession.GenerationError.Context(debugDescription: Failed to convert text into into GeneratedContentnText: waffles, underlyingErrors: [Swift.DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: The given data was not valid JSON., underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 Unexpected character 'w' around line 1, column 1. UserInfo={NSJSONSerializationErrorIndex=0, NSDebugDescription=Unexpected character 'w' around line 1, column 1.})))]))
1
0
135
Jul ’25
xcrun problem with Xcode 26 Beta 3
We are trying to run Xcode 26 Beta 3 in our CI but it gives the following error when trying to install simulators: [04:23:37]: ▸ 2025-07-22 04:23:37.173 xcodebuild[856:11336] [MT] DVTPlugInLoading: Failed to load code for plug-in com.apple.dt.IDESimulatorFoundation (/Applications/Xcode-beta.app/Contents/Frameworks/IDESimulatorFoundation.framework), error = Error Domain=NSCocoaErrorDomain Code=3588 dlopen(/Applications/Xcode-beta.app/Contents/Frameworks/IDESimulatorFoundation.framework/IDESimulatorFoundation, 0x0109): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator [04:23:37]: ▸ Referenced from: /Applications/Xcode-beta.app/Contents/Frameworks/IDESimulatorFoundation.framework/Versions/A/IDESimulatorFoundation [04:23:37]: ▸ Reason: tried: '/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Version
2
0
154
Jul ’25
App Crashes in Xcode 26 Beta 3
Hi, I'm trying to install run the app in Xcode 26 Beta 3 and getting the below error. *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Error during decoding of 1723: Error Domain=NSCocoaErrorDomain Code=4864 Class 'BSAuditToken' has a superclass that supports secure coding, but 'BSAuditToken' overrides -initWithCoder: and does not override +supportsSecureCoding. The class must implement +supportsSecureCoding and return YES to verify that its implementation of -initWithCoder: is secure coding compliant. UserInfo={NSDebugDescription=Class 'BSAuditToken' has a superclass that supports secure coding, but 'BSAuditToken' overrides -initWithCoder: and does not override +supportsSecureCoding. The class must implement +supportsSecureCoding and return YES to verify that its implementation of -initWithCoder: is secure coding compliant.}' terminating due to uncaught exception of type NSException CoreSimulator 1043 - Device: iPhone 16 Pro (F158F199-A41E-4967-87C6-58A42C9C1954)
2
0
294
Jul ’25
Mac Permissions Issue - Likely involving Xcode
Getting Error Domain=NSCocoaErrorDomain Code=513 You don’t have permission to save the file unexpectedly while attempting to create a small log file. Here's some background. This is a Swift app I wrote for my own use six years ago. A week ago, I made a small update to the app, which has not been changed in over two years. First time using Xcode 16.4 on this app, which required some code updates of course. The code creating this file has not been changed. Now for the first time, I'm getting this permissions error on a folder with wide-open permissions. This is the code. Worked for years under previous versions of Xcode. * if let outputURL = URL(string: file:// + logPath + /output_ + outputFormatter.string(from:Date()) + .txt){ do{ try outputString.write(to: outputURL, atomically:false, encoding: .utf8) }catch let error as NSError{ print (log write error (error) (nl) (outputString)) } }
2
0
162
Jul ’25
Share extension with App Group: UserDefaults don't get persisted on iOS
I have a multiplatform app for Mac and iOS, for which I am implementing a share extension. This share extension has to share settings with the app itself on both platforms. I am currently trying to achieve this by adding all targets to the same App Group and using UserDefaults with the App Group as suiteName. The app consists of three targets: A multiplatform SwiftUI app, an iOS Share Extension, and a macOS Share Extension,. Settings get persisted correctly on Mac and on the iOS 26 simulator. However, on a real iOS 26 beta 3 device, the Share Extension is unable to load UserDefaults (loading anything with the App Group as a suite name returns nil). What could cause this behavior? The following log entries are generated from the Share Extension on the iOS device, but not on the iOS simulator: Couldn't read values in CFPrefsPlistSource<0x1030d3c80> (Domain: MY_APP_GROUP, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container i
1
0
164
Jul ’25
Fails to Find AuthKey .p8 in Unity Cloud Build Post-Build Script
Hi everyone!I got an error trying to automatically upload my .ipa to TestFlight through Post-build script (Unity Cloud Build (Build Automation)): [error] ErrorDomain=ITunesConnectionAuthenticationErrorDomain Code=-26000 “Failed to generate JWT token: ErrorDomain=NSCocoaErrorDomain Code=-43 ‘Failed to load AuthKey file.’ The file ‘AuthKey_.p8’ could not be found in: • /BUILD_PATH/.../private_keys • ~/private_keys • ~/.private_keys • ~/.appstoreconnect/private_keys” In post-build.bash I tried the following two options but both don't work: 1 option: KEY_WITH_NEWLINES=$(echo $CONNECT_API_KEY | jq '.private_key |= sub( (?!PRIVATE|KEY); n; g)' -c -j) echo $KEY_WITH_NEWLINES > ~/.appstoreconnect/private_keys/AuthKey_${API_KEY_ID}.p8 2 option: mkdir -p ~/.appstoreconnect/private_keys echo $CONNECT_API_KEY | jq -r '.private_key' > ~/.appstoreconnect/private_keys/AuthKey_${API_KEY_ID}.p8 In Unity Cloud Build (Build Automation) → Advanced Options → Environment Variables → Variable value for CONNECT_API_KE
2
0
179
Jun ’25
On Log Noise - Debugging
I came across several errors being reported when I run my app, however my app seems to function correctly. I believe they fall in the category listed on this ( now locked ) thread https://developer.apple.com/forums/thread/115461 However, I wanted to post the ones I found to clarify ( close to submission) just in case any of these end up being more than just log noise later. PLEASE let me know if you've come across these before and whether they impacted anything or if you can confirm they are just log noise. Thanks in advance! -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID. inputModality = Keyboard, inputOperation = , customInfoType = UIEmojiSearchOperations AVAudioSession_iOS.mm:2,223 Server returned an error from destroySession:. Error Domain=NSCocoaErrorDomain Code=4099 “The connection to service with pid 102 named com.apple.audio.AudioSession was invalidated from this process.” UserInfo={NSDebugDescription=The connecti
10
0
3.1k
Jun ’25