My app (FindAnyFile) provides a Finder-like interface in which it also offers a QuickLook preview command, which invokes [[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront:nil]; Now, if it shows .abcdp files, it often, but not always, crashes. This has been happening for many macOS versions, at least since 10.15, up to 26.1. Also, it does not seem to matter which SDK/Xcode I build with, as I used several and all versions lead to the crash. The issue rather appears to be inside the QLplugin for the AB file (ABCardCollectionView etc.). I am able to trace this crash in Xcode. There are a LOT of errors and warnings coming up, and eventually the qlplugin throws an ObjC exception which in turn brings down my entire app (and here I thought that the XPC system was designed to expressly avoid such crashes). Possibly significant errors are: CNAccountCollectionUpdateWatcher 0x6000025cf800: Update event received, but store registration failed. This event will be handled, but the behavior is undefined. Error using
Search results for
NSCocoaErrorDomain
1,063 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Thanks, I'll check explicitly for the combination of NSCocoaErrorDomain and NSFileReadNoSuchFileError then. For anyone ending up in this thread, note that NSFileNoSuchFileError is not the same error as what's being reported by checkResourceIsReachableAndReturnError. The error is: Domain=NSCocoaErrorDomain Code=260 The file “write-single-file.txt” couldn’t be opened because there is no such file. UserInfo={NSURL=file:///Users/torarne/write-single-file.txt, NSFilePath=/Users/torarne/write-single-file.txt, NSUnderlyingError=0xa83590c90 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}}
Topic:
App & System Services
SubTopic:
Core OS
Tags:
XCode version = 26 && macOS version = 26 Running the app from XCode (not in release mode) I want to implement in app purchases for my macOS application, for that i want to first test it locally through StoreKit config file. Steps i have done uptill now: Added the capability in target-> Signing & Capabilities -> In_App Purchase(while adding this i had got the popup: Make changes to In-App Purchase by changing all configurations - i have no idea about it, Researched on it - didnt got something) Added the storekit config file -> added Group for autorenewable subscription -> reference name & product ID (i have used same Bundle ID and product ID, also i have used different both but still the same issue in both case) - also added it to scheme Added the storeManager implementation that is: import StoreKit class IAPManager { // Shared instance (optional singleton pattern) static let shared = IAPManager() private init() { } // Array to store fetched products var products: [Product] = [] //
Topic:
App Store Distribution & Marketing
SubTopic:
General
My standard approach would be to try creating the security-scoped bookmark and see if that fails. I’m presuming that you tried that. What went wrong? Thanks Quinn! Yepp, that's the first thing I tried. It produces a console error: Scoped bookmarks can only be created for existing files or directories Type: Error | Timestamp: 2025-11-18 14:10:18.411061+01:00 | Process: tst_manual_sandboxed_file_access | Library: CoreServicesInternal | Subsystem: com.apple.FileURL | Category: scoped | TID: 0xdd7936 and the bookmarkDataWithOptions call fails with an NSError: Error Domain=NSCocoaErrorDomain Code=260 Scoped bookmarks can only be created for existing files or directories UserInfo={NSURL=file:///Users/torarne/write-single-file2.txt, NSDebugDescription=Scoped bookmarks can only be created for existing files or directories} Which led me to using [NSURL checkResourceIsReachableAndReturnError:] before saving the bookmark. And in turn this forum topic to determine if that's the right approach to handle this use-
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Device: iPhone [model], iOS 18.6.2 Xcode: 16.0.x Team: Individual paid Apple Developer Program (not Personal Team), shows as my full name in Xcode I’m trying to use CoreNFC via NFCTagReaderSession in a small SwiftUI app (part of a larger project). So far I’ve done: • Enrolled in the Apple Developer Program (individual). • Confirmed that in Certificates, Identifiers & Profiles → Identifiers, my App ID for com.<…> has Near Field Communication Tag Reading enabled. • Created an iOS App Development provisioning profile for that App ID, including: • my Apple Development certificate • my iPhone device • Downloaded the profile, double-clicked it, and set it in Xcode under Signing & Capabilities with: • Team = my full-name team • “Automatically manage signing” off, using the custom profile. • Added the NFC Scan capability in Signing & Capabilities. • Added Privacy - NFC Scan Usage Description (NFCReaderUsageDescription) in Info.plist with a non-empty string. The app builds and runs on device. When I
Updated the phone to iOS 26.1 and now the app is not working anymore, even previously approved version published on App Store which works perfectly on iOS 26.0.1, and iOS 18+. I deleted the app from the phone and installed fresh from App Store, still the same. Logic is that on start app copies previously prepared SwiftData store file (using the same models) from app bundle to Documents directory and uses it. Currently app just hungs with loader spinner spinning as it can t connect to the store. Getting this error in console when running from Xcode on real device with iOS 26.1 installed: CoreData: error: CoreData: error: Store failed to load. (type: SQLite, url: file:///var/mobile/Containers/Data/Application/DA32188D-8887-48F7-B828-1F676C8FBEF8/Documents/default.store) with error = Error Domain=NSCocoaErrorDomain Code=134140 Persistent store migration failed, missing mapping model. UserInfo={sourceModel=() isEditable 0, entities { /// there goes some long models description addPersistentStoreWithType
I encounter a connection error with Apple Configurator v2.18 when, after making changes in macOS Sequel 15.6.1, I want to apply and transfer the changes to the iPhone icon layout in iOS 26: Apple Configurator v2.18 crashes and returns an error message: ‘Try the operation again. If it fails, quit the application, launch it again, and try again. [NSCocoaErrorDomain – 0x1001 (4097)]’ I have done some research, and it seems that this bug has been identified and fixed in Apple Configurator 2 v2.19 (Build 10434). Have you encountered this problem? Do you know where to find version v2.19? This fixed version does not appear to have been released yet, and Apple support has been unable to help me. Thank you all for your help.
Topic:
Business & Education
SubTopic:
Device Management
Hello, Thank you for your detailed response to my previous question. I understand that including all classes used within the app in the ofClasses parameter is not the correct pattern. Situation Update: Following your advice, I tested by including only the root object's class in ofClasses. Class X contains nested objects Y and Z. // Including only root object and some nested objects NSKeyedUnarchiver.unarchivedObject(ofClasses: [X.self, Y.self], from: data) Problem Encountered: However, I encountered the following error: Error Domain=NSCocoaErrorDomain Code=4864 value for key 'anotherNestedObject' was of unexpected class 'Z'. Allowed classes are: { 'X', 'Y' } The error was only resolved when I included class Z in ofClasses as well. Current Implementation Verification: Class X properly implements NSSecureCoding In the init(coder:) method, it individually decodes nested objects using coder.decodeObject(ofClass: Y.self, forKey: nestedObject) and coder.decodeObject(ofClass: Z.self, forKey: anotherNestedOb
Topic:
App & System Services
SubTopic:
General
Tags:
Our app is unable to write to its own sandbox container on macOS when run via “My Mac (Designed for iPad)”. This is not an issue when the app runs on iPhone or on iPad. So, the one thing to understand here is that the sandbox enforcement system operates at a low enough level of the system that I can't really fail*, at least not in a broad, systemic way. That's particularly true of apps running compatibility mode, which are designed to operate with very limited access. *Putting that in more concrete terms, if the basic app sandbox configuration is broken in some large-scale way, then the entire system tends to fall apart. That dynamic makes large-scale problems hard to... miss. Because of that, the assumption I'd start with here isn't may app can't read/write its files, but is instead either: I'm trying to access the wrong place. Something external to my app is interfering with my app’s ability to function. Expanding on that second point, it's important to remember that macOS is FAR more flexible/configurable
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Our app is unable to write to its own sandbox container on macOS when run via “My Mac (Designed for iPad)”. This is not an issue when the app runs on iPhone or on iPad. This seems to affect all attempts to write to the file system including: UserDefaults Core Data (SQLite) Firebase (Analytics, Crashlytics, Sessions) File creation (PDFs, temp files, etc.) We're seeing the following errors in the console: Operation not permitted / NSCocoaErrorDomain Code=513: Permissions error when writing to disk. CFPrefsPlistSource: Path not accessible: Failure to write to UserDefaults. Cannot synchronize user defaults to disk: UserDefaults write blocked. CoreData: No permissions to create file: Core Data SQLite store can't be created. Firebase: Failed to open database: Firebase can't initialize local storage. CGDataConsumerCreateWithFilename: failed to open ... for writing: PDF generation fails due to temp directory access issues. Created a test project to try and reproduce the issue but unable to do so in the test
I have an app with SwiftData and CloudKit sync enabled, it was working fine but I recently noticed that the sync with CloudKit is not working anymore. All the changes are persisted locally just fine. When running in simulator (iOS 26/iPhone 17 Pro) I get the following error in the console: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:](2317): - Attempting recovery from error: Error Domain=NSCocoaErrorDomain Code=134421 Export encountered an unhandled exception while analyzing history in the store. UserInfo={NSLocalizedFailureReason=Export encountered an unhandled exception while analyzing history in the store., NSUnderlyingException=-[NSEntityDescription objectID]: unrecognized selector sent to instance 0x60000351aec0} I already tried Reseting the environment back to production in CloudKit and Erasing all Contents and Settings in the simulator but I keep getting the same error. Is there something else I can do to fix this?
Hello everyone, I published my game Boulder Dash 40 which was created in Unity, exported as an Xcode project, and uploaded using Xcode’s Archive and Distribute functionality. The game successfully passed Apple’s review process and is available on the App Store. However, two users have reported that they are unable to install the game on their Macs. After downloading, the installation fails with an error message. The game installs and runs correctly for other users, including myself. Both affected users installed the game using redeem codes and had no prior installation of the game on their devices. The installation failure also occurs when attempting to install the app via TestFlight. I have made several changes to settings in both Unity and Xcode, but the issue persists. Could anyone provide insights or suggestions on what might be causing this installation failure? Thank you in advance for your help! Best regards, Jan Part of installation log with error attached install.log
Topic:
App Store Distribution & Marketing
SubTopic:
General
so the BluetoothManager.scan... was a hardware problem. now I see {msg:#Warning Error reading file, file://private/var/Managed Preferences/mobile/com.apple.CoreMotion.plist, error:Error Domain=NSCocoaErrorDomain Code=257 The file “com.apple.CoreMotion.plist” couldn’t be opened because you don’t have permission to view it. UserInfo={NSFilePath=//private/var/Managed Preferences/mobile/com.apple.CoreMotion.plist, NSURL=file:////private/var/Managed%20Preferences/mobile/com.apple.CoreMotion.plist, NSUnderlyingError=0x14cc64ea0 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}}} I have the motion privacy tag in the plist for the code doing request camera assistance in the connect handler for the nearby operation.. in setup accessory dump of capabilities direction = false device does not support direction measurement device DOES support camera assistance here is the code logger.info(dump of capabilities direction = (NISession.deviceCapabilities.supportsDirectionMeasurement)); if(!(NISession.d
Topic:
Accessibility & Inclusion
SubTopic:
General
Tags:
Should be noted that this doesnt work for both Adding images from Assets or from the PhotoPicker, here are my logs when i try to add from the photopicker: Error acquiring assertion: 59638328 Plugin query method called (501) Invalidation handler invoked, clearing connection (501) personaAttributesForPersonaType for type:0 failed with error Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated from this process. UserInfo={NSDebugDescription=The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated from this process.} LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 process may not map database UserInfo={_LSLine=72, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler, _LSFile=LSDReadService.mm, NSDebugDescription=process may not map database} Attempt to map database failed: permission was denied. This attempt will not be retried. Failed to initi
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
After downloading Backyard Birds and following the steps in the section Configure the sample code project (i.e. enabling local StoreKit testing in the scheme). When I run the macOS app from within XCode, the following error occurs. Whenever I try to purchase any item from within the app, I am presented with the following error dialogue: Couldn’t communicate with a helper application. Try your operation again. If that fails, quit and relaunch the application and try again. This happens after I click the purchase button (i.e. the button that displays the price). The Xcode logs show the following errors: Error handling payment sheet request: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service created from an endpoint was invalidated from this process. UserInfo={NSDebugDescription=The connection to service created from an endpoint was invalidated from this process.} Type: Error | Timestamp: 2025-09-26 18:05:36.214491+02:00 | Process: Backyard Birds | Library: StoreKit | Subsystem: com.app
Topic:
App & System Services
SubTopic:
StoreKit