After upgrading to macOS 26, I noticed that showing a Quicklook preview in my app is very slow. Showing small text files is fine, but some other files I've tried, such as a Numbers document, take about 30 seconds (during which the indeterminate loading indicator appears) before the preview is shown. When showing the preview of an app, such as Xcode, the panel opens immediately with a placeholder image for the Xcode icon, and the actual Xcode icon is shown only after about 25 seconds. During this time many logs appear: FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.2/ (/) FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.23684/ (/Users) FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.248032/ (/Users/n{9}k) FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.248084/ (/Users/n{9}k/Downloads) Failed to add registration dmf.policy.monitor.app with error: Error Domain=NSCocoaErrorDomain Co
Search results for
NSCocoaErrorDomain
1,063 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I'm having a problem on macOS 26 that has not happened on previous macOS versions. When I call guard url.startAccessingSecurityScopedResource() else { return } try url.bookmarkData(options: [.withSecurityScope]) with url being file:///, I get an error Error Domain=NSCocoaErrorDomain Code=256 File descriptor doesn't match the real path. Given that Google returns 0 results on this error, I suppose this is a macOS 26 novelty. (The bookmark data created before upgrading to 26 resolve well). Does anyone already met this or have an idea on how to get around it? The app is a file manager, so having bookmarked access to / is crucial.
I'd like to set my macOS app written in Swift as default app when opening .mp4 file. I think I can do it with setDefaultApplication(at:toOpen:completion:). https://developer.apple.com/documentation/appkit/nsworkspace/3753002-setdefaultapplication However, permission error occurs when I use it. The error is: Error Domain=NSCocoaErrorDomain Code=256 The file couldn’t be opened. UserInfo={NSUnderlyingError=0x6000031d0150 {Error Domain=NSOSStatusErrorDomain Code=-54 permErr: permissions error (on file open)}} I tried to give my app full-disk access, but it didn't work. I also tried to use setDefaultApplication(at:toOpenFileAt:completion:), then it works with no error, but it effects on only one file. What I want to do is to set my app as default app of all .mp4 files. How do I achieve this? My code is like below: let bundleUrl = Bundle.main.bundleURL NSWorkspace.shared.setDefaultApplication(at: bundleUrl, toOpen: .mpeg4Movie) { error in print(error) } Thank you.
Regarding feedback FB20954846 for App Clip support, I got a message from Apple saying it is fixed. I can now compile, and code sign for an App Clip using the DeclaredAgeRange API. Great. Now that I can get past the compiler failure I'm running up against a new issue. When installed via TestFlight, an App Clip throws that the age range is unavailable. In the console app it looks like the App Clip is still prohibited from calling the system functionality: default PerformanceOrganizer AppClip 18:36:39.200071-0600 (501) Failed to fetch persona: got error from remote proxy: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: Connection init failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: Connection init failed at lookup with error 159 - Sandbox restriction.} error PerformanceOrganizer AppClip 18:36:39.200108-0600 (50
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags:
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
Apple WTF? What did you do to all my Apps? none of them work in iOS26.1 (all worked in 26.0). XCode simply says: CoreData: error: addPersistentStoreWithType:configuration:URL:options:error: returned error NSCocoaErrorDomain (134140) * SwiftData is supposed to do all these automatically 🤷🏻
SharedModelContainer.txt Folks who filed their feedback report may have gotten responses from the feedback system. For people who see the same issue but haven't yet filed any feedback report, I'd like to share our investigation here to hopefully help. To give you more context, SwiftData (with DefaultStore) uses Core Data as its underlying storage mechanism. At runtime, SwiftData converts the schema to an in-memory Core Data model (NSManagedObjectModel), and uses the model to load and persist the data store. Before system 26.1, when handling an attribute of an array type, SwiftData converts the array type to Binary Data. On system 26.1, it instead converts the type to Transformable. This change leads to a difference between the in-memory model and the model used in the persisted data store, triggering a migration error with the following message: Error Domain=NSCocoaErrorDomain Code=134140 Persistent store migration failed, missing mapping model.” To work around the issue, you might consider the follo
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
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:
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
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. 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
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:
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