Modern versions of macOS use a file system permission model that’s far more complex than the traditional BSD rwx model, and this post is my attempt at explaining that model. If you have a question about this, post it here on DevForums. Put your thread in the App & System Services > Core OS topic area and tag it with Files and Storage.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
On File System Permissions
Modern versions of macOS have five different file system permission mechanisms:
Traditional BSD permissions
Access control lists (ACLs)
App Sandbox
Mandatory access control (MAC)
Endpoint Security (ES)
The first two were introduced a long time ago and rarely trip folks up. The second two are newer, more complex, and specific to macOS, and thus are the source of some confusion. Finally, Endpoint Security allows third-party developers to deny file system operations based on their own criteria. This post offers explanations and advice about all of these mechanisms.
Error Codes
App Sandbox and the mandatory access control system are both implemented using macOS’s sandboxing infrastructure. When a file system operation fails, check the error to see whether it was blocked by this sandboxing infrastructure. If an operation was blocked by BSD permissions or ACLs, it fails with EACCES (Permission denied, 13). If it was blocked by something else, it’ll fail with EPERM (Operation not permitted, 1).
If you’re using Foundation’s FileManager, these error are both reported as Foundation errors, for example, the NSFileReadNoPermissionError error. To recover the underlying error, get the NSUnderlyingErrorKey property from the info dictionary.
App Sandbox
File system access within the App Sandbox is controlled by two factors. The first is the entitlements on the main executable. There are three relevant groups of entitlements:
The com.apple.security.app-sandbox entitlement enables the App Sandbox. This denies access to all file system locations except those on a built-in allowlist (things like /System) or within the app’s containers.
The various “standard location” entitlements extend the sandbox to include their corresponding locations.
The various “file access temporary exceptions” entitlements extend the sandbox to include the items listed in the entitlement.
Collectively this is known as your static sandbox.
The second factor is dynamic sandbox extensions. The system issues these extensions to your sandbox based on user behaviour. For example, if the user selects a file in the open panel, the system issues a sandbox extension to your process so that it can access that file. The type of extension is determined by the main executable’s entitlements:
com.apple.security.files.user-selected.read-only results in an extension that grants read-only access.
com.apple.security.files.user-selected.read-write results in an extension that grants read/write access.
Note There’s currently no way to get a dynamic sandbox extension that grants executable access. For all the gory details, see this post.
These dynamic sandbox extensions are tied to your process; they go away when your process terminates. To maintain persistent access to an item, use a security-scoped bookmark. See Accessing files from the macOS App Sandbox. To pass access between processes, use an implicit security scoped bookmark, that is, a bookmark that was created without an explicit security scope (no .withSecurityScope flag) and without disabling the implicit security scope (no .withoutImplicitSecurityScope flag)).
If you have access to a directory — regardless of whether that’s via an entitlement or a dynamic sandbox extension — then, in general, you have access to all items in the hierarchy rooted at that directory. This does not overrule the MAC protection discussed below. For example, if the user grants you access to ~/Library, that does not give you access to ~/Library/Mail because the latter is protected by MAC.
Finally, the discussion above is focused on a new sandbox, the thing you get when you launch a sandboxed app from the Finder. If a sandboxed process starts a child process, that child process inherits its sandbox from its parent. For information on what happens in that case, see the Note box in Enabling App Sandbox Inheritance.
IMPORTANT The child process inherits its parent process’s sandbox regardless of whether it has the com.apple.security.inherit entitlement. That entitlement exists primarily to act as a marker for App Review. App Review requires that all main executables have the com.apple.security.app-sandbox entitlement, and that entitlements starts a new sandbox by default. Thus, any helper tool inside your app needs the com.apple.security.inherit entitlement to trigger inheritance. However, if you’re not shipping on the Mac App Store you can leave off both of these entitlement and the helper process will inherit its parent’s sandbox just fine. The same applies if you run a built-in executable, like /bin/sh, as a child process.
When the App Sandbox blocks something, it might generates a sandbox violation report. For information on how to view these reports, see Discovering and diagnosing App Sandbox violations.
To learn more about the App Sandbox, see the various links in App Sandbox Resources. For information about how to embed a helper tool in a sandboxed app, see Embedding a Command-Line Tool in a Sandboxed App.
Mandatory Access Control
Mandatory access control (MAC) has been a feature of macOS for many releases, but it’s become a lot more prominent since macOS 10.14. There are many flavours of MAC but the ones you’re most likely to encounter are:
Full Disk Access (macOS 10.14 and later)
Files and Folders (macOS 10.15 and later)
App bundle protection (macOS 13 and later)
App container protection (macOS 14 and later)
App group container protection (macOS 15 and later)
Data Vaults (see below) and other internal techniques used by various macOS subsystems
Mandatory access control, as the name suggests, is mandatory; it’s not an opt-in like the App Sandbox. Rather, all processes on the system, including those running as root, as subject to MAC.
Data Vaults are not a third-party developer opportunity. See this post if you’re curious.
In the Full Disk Access and Files and Folders cases, users grant a program a MAC privilege using System Settings > Privacy & Security. Some MAC privileges are per user (Files and Folders) and some are system wide (Full Disk Access). If you’re not sure, run this simple test:
On a Mac with two users, log in as user A and enable the MAC privilege for a program.
Now log in as user B. Does the program have the privilege?
If a process tries to access an item restricted by MAC, the system may prompt the user to grant it access there and then. For example, if an app tries to access the desktop, you’ll see an alert like this:
“AAA” would like to access files in your Desktop folder.
[Don’t Allow] [OK]
To customise this message, set Files and Folders properties in your Info.plist.
This system only displays this alert once. It remembers the user’s initial choice and returns the same result thereafter. This relies on your code having a stable code signing identity. If your code is unsigned, or signed ad hoc (Signed to Run Locally in Xcode parlance), the system can’t tell that version N+1 of your code is the same as version N, and thus you’ll encounter excessive prompts.
Note For information about how that works, see TN3127 Inside Code Signing: Requirements.
The Files and Folders prompts only show up if the process is running in a GUI login session. If not, the operation is allowed or denied based on existing information. If there’s no existing information, the operation is denied by default.
For more information about app and app group container protection, see the links in Trusted Execution Resources. For more information about app groups in general, see App Groups: macOS vs iOS: Working Towards Harmony
On managed systems the site admin can use the com.apple.TCC.configuration-profile-policy payload to assign MAC privileges.
For testing purposes you can reset parts of TCC using the tccutil command-line tool. For general information about that tool, see its man page. For a list of TCC service names, see the posts on this thread.
Note TCC stands for transparency, consent, and control. It’s the subsystem within macOS that manages most of the privileges visible in System Settings > Privacy & Security. TCC has no API surface, but you see its name in various places, including the above-mentioned configuration profile payload and command-line tool, and the name of its accompanying daemon, tccd.
While tccutil is an easy way to do basic TCC testing, the most reliable way to test TCC is in a VM, restoring to a fresh snapshot between each test. If you want to try this out, crib ideas from Testing a Notarised Product.
The MAC privilege mechanism is heavily dependent on the concept of responsible code. For example, if an app contains a helper tool and the helper tool triggers a MAC prompt, we want:
The app’s name and usage description to appear in the alert.
The user’s decision to be recorded for the whole app, not that specific helper tool.
That decision to show up in System Settings under the app’s name.
For this to work the system must be able to tell that the app is the responsible code for the helper tool. The system has various heuristics to determine this and it works reasonably well in most cases. However, it’s possible to break this link. I haven’t fully research this but my experience is that this most often breaks when the child process does something ‘odd’ to break the link, such as trying to daemonise itself.
If you’re building a launchd daemon or agent and you find that it’s not correctly attributed to your app, add the AssociatedBundleIdentifiers property to your launchd property list. See the launchd.plist man page for the details.
Scripting
MAC presents some serious challenges for scripting because scripts are run by interpreters and the system can’t distinguish file system operations done by the interpreter from those done by the script. For example, if you have a script that needs to manipulate files on your desktop, you wouldn’t want to give the interpreter that privilege because then any script could do that.
The easiest solution to this problem is to package your script as a standalone program that MAC can use for its tracking. This may be easy or hard depending on the specific scripting environment. For example, AppleScript makes it easy to export a script as a signed app, but that’s not true for shell scripts.
TCC and Main Executables
TCC expects its bundled clients — apps, app extensions, and so on — to use a native main executable. That is, it expects the CFBundleExecutable property to be the name of a Mach-O executable. If your product uses a script as its main executable, you’re likely to encounter TCC problems. To resolve these, switch to using a Mach-O executable. For an example of how you might do that, see this post.
Endpoint Security
Endpoint Security (ES) is a general mechanism for third-party products to enforce custom security policies on the Mac. An ES client asks ES to send it events when specific security-relevant operations occur. These events can be notifications or authorisations. In the case of authorisation events, the ES client must either allow or deny the operation.
As you might imagine, the set of security-relevant operations includes file system operations. For example, when you open a file using the open system call, ES delivers the ES_EVENT_TYPE_AUTH_OPEN event to any interested ES clients. If one of those ES client denies the operation, the open system call fails with EPERM.
For more information about ES, see the Endpoint Security framework documentation.
Revision History
2025-11-04 Added a discussion of Endpoint Security. Made numerous minor editorial changes.
2024-11-08 Added info about app group container protection. Clarified that Data Vaults are just one example of the techniques used internally by macOS. Made other editorial changes.
2023-06-13 Replaced two obsolete links with links to shiny new official documentation: Accessing files from the macOS App Sandbox and Discovering and diagnosing App Sandbox violations. Added a short discussion of app container protection and a link to WWDC 2023 Session 10053 What’s new in privacy.
2023-04-07 Added a link to my post about executable permissions. Fixed a broken link.
2023-02-10 In TCC and Main Executables, added a link to my native trampoline code. Introduced the concept of an implicit security scoped bookmark. Introduced AssociatedBundleIdentifiers. Made other minor editorial changes.
2022-04-26 Added an explanation of the TCC initialism. Added a link to Viewing Sandbox Violation Reports. Added the TCC and Main Executables section. Made significant editorial changes.
2022-01-10 Added a discussion of the file system hierarchy.
2021-04-26 First posted.
Files and Storage
RSS for tagAsk questions about file systems and block storage.
Posts under Files and Storage tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
General:
Forums subtopic: App & System Services > Core OS
Forums tags: Files and Storage, Foundation, FSKit, File Provider, Finder Sync, Disk Arbitration, APFS
Foundation > Files and Data Persistence documentation
Low-level file system APIs are documented in UNIX manual pages
File System Programming Guide archived documentation
About Apple File System documentation
Apple File System Guide archived documentation
File system changes introduced in iOS 17 forums post
On File System Permissions forums post
Extended Attributes and Zip Archives forums post
Unpacking Apple Archives forums post
Creating new file systems:
FSKit framework documentation
File Provider framework documentation
Finder Sync framework documentation
App Extension Programming Guide > App Extension Types > Finder Sync archived documentation
Managing storage:
Disk Arbitration framework documentation
Disk Arbitration Programming Guide archived documentation
Mass Storage Device Driver Programming Guide archived documentation
Device File Access Guide for Storage Devices archived documentation
BlockStorageDeviceDriverKit framework documentation
Volume format references:
Apple File System Reference
TN1150 HFS Plus Volume Format
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Hello,
I have an asset pack that I'm use to periodically distribute a sqlite database thats being used to an NSPersistentStore.
Because the database is over a few GBs, and the files in an AssetPack are not mutable, I have to stream the database into a temporary file, then replace my NSPersistentStore.
This requires that the user has 3x the storage available of the database, and permanently uses twice to storage needed.
I'd like:
To be able to mark a URL/File to be accessible for read/write access
To be able to mark a file / URL as consumed when it's no needed. So that it can be cleared from the user storage while still maintaining an active subscription to the asset pack for updates.
Thank you
Topic:
App & System Services
SubTopic:
General
Tags:
Files and Storage
On demand resources
Core Data
Background Assets
macOS Tahoe 26: DFS namespace subfolders return "No route to host" while direct SMB connections work
Environment
macOS Tahoe 26.2 (Build 25C56)
Also tested with macOS 26.3 Developer Beta - same issue
Windows Server 2022 DFS namespace
Connection via Tailscale VPN (but also tested with direct network connection)
Problem Description
When connecting to a Windows Server 2022 DFS namespace from macOS Tahoe, the root namespace connects successfully, but all subfolders appear empty and return either:
"No route to host"
"Authentication error" (alternates inconsistently)
Steps to Reproduce
Set up a Windows Server 2022 DFS namespace (e.g., \\domain.com\fs)
Add DFS folder targets pointing to file servers (e.g., \\fs02\share, \\fs03\share)
From macOS Tahoe, connect via Finder: smb://domain.com/fs
Root namespace mounts successfully
Issue: Subfolders show as empty or return "No route to host" when accessed
What Works
Direct SMB connections to individual file servers work perfectly:
smb://10.118.0.26/sharename ✓
smb://fs02.domain.com/sharename ✓
Same DFS namespace works from Windows clients
Same DFS namespace worked from macOS Sonoma 14.4+
What Doesn't Work
DFS referrals from macOS Tahoe 26.x to any DFS folder target
The issue persists regardless of:
Kerberos vs NTLM authentication
SMB signing enabled/disabled on servers
Various /etc/nsmb.conf configurations
DNS resolution (tested with IPs and FQDNs)
Historical Context
A similar DFS referral bug existed in macOS Sonoma 14.0 and was fixed in 14.1. This appears to be a regression in macOS Tahoe 26.
Request
Please investigate the DFS referral handling in macOS Tahoe. The fact that direct SMB connections work while DFS referrals fail suggests an issue specifically in the DFS referral processing code.
Feedback Assistant report will be filed separately.
I got this error despite documentation saying it exits:
https://developer.apple.com/documentation/foundation/urlresourcevalues/tagnames
I'm building for iPadOS 26.2
I have an app that has been using the following code to down load audio files:
if let url = URL(string: episode.fetchPath()) {
var request = URLRequest(url: url)
request.httpMethod = "get"
let task = session.downloadTask(with: request)
And then the following completionHandler code:
func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) {
try FileManager.default.moveItem(at: location, to: localUrl)
In the spirit of modernization, I'm trying to update this code to use async await:
var request = URLRequest(url: url)
request.httpMethod = "get"
let (data, response) = try await URLSession.shared.data(for: request)
try data.write(to: localUrl, options: [.atomicWrite, .completeFileProtection])
Both these code paths use the same url value. Both return the same Data blobs (they return the same hash value)
Unfortunately the second code path (using await) introduces a problem. When the audio is playing and the iPhone goes to sleep, after 15 seconds, the audio stops. This problem does not occur when running the first code (using the didFinish completion handler)
Same data, stored in the same URL, but using different URLSession calls. I would like to use async/await and not have to experience the audio ending after just 15 seconds of the device screen being asleep. any guidance greatly appreciated.
Topic:
App & System Services
SubTopic:
Networking
Tags:
Files and Storage
Network
CFNetwork
Background Tasks
I am developing an iOS/iPadOS application and have encountered some behavior regarding Files App and security-scoped bookmarks that I would like to clarify.
Additionally, I would like to report some behavior which might include a potential issue.
Question1: Accessing deleted files via bookmark (Specification clarification)
Our app saves file URLs as bookmarks, which file that user has selected on Files App or app-created so to open a file which user has modified previously in the next launch.
When a user deletes a file in Files App (moves a file to Recently Deleted), the app can still resolve the bookmark and access the file for read/write operations.
Is this behavior intended?
In other words, is it correct that a bookmark can access a file that has been deleted in Files App but not permanently removed?
Question2: Overwriting a file in Recently Deleted (Potential bug)
We noticed that overwriting a file in Recently Deleted behaves differently depending on the method used.
Current implementation
1.Create a temporary file in the same directory
2.Write content to the temporary file
3.Delete the original file ([NSFileManager removeItemAtURL:error:])
4.Move the temporary file to the original file path ([NSFileManager moveItemAtURL:toURL:error:])
Result: The file disappears from Files App Recently Deleted.
In contrast, using
[NSFileManager replaceItemAtURL:withItemAtURL:]
keeps the file visible in Recently Deleted.
Is this difference designed behavior?
If not, this may be a bug.
Question3: Detecting files in Recently Deleted
We want to detect whether a file resides in Recently Deleted, but we cannot find a reliable and officially supported method.
Recently Deleted files appear under .Trash, but using the path alone is not a reliable method.
We have tried the following APIs without success:
[NSURL getResourceValue:forKey:NSURLIsHiddenKey error:]
[NSURL checkResourceIsReachableAndReturnError:]
[NSFileManager fileExistsAtPath:]
[NSFileManager isReadableFileAtPath:]
[NSFileManager getRelationship:ofDirectory:NSTrashDirectory inDomain:NSUserDomainMask toItemAtURL:error:]
We could not obtain the Recently Deleted folder URL using standard APIs.
[NSFileManager URLsForDirectory:NSTrashDirectory inDomains:NSUserDomainMask]
[NSFileManager URLForDirectory:NSTrashDirectory inDomain:NSUserDomainMask appropriateForURL:url create:error:]
Could you advise a safe and supported way to detect Recently Deleted files properly by the app?
Since the introduction of the siblings / and /System/Volumes/Data architecture, some very basic, critical commands seems to have a broken behaviour ( cp, rsync, tar, cpio…).
As an example, ditto which was introduced more than 10 years ago to integrate correctly all the peculiarity of HFS Apple filesystem as compared to the UFS Unix filesystem is not behaving correctly.
For example, from man ditto:
--rsrc Preserve resource forks and HFS meta-data. ditto will
store this data in Carbon-compatible ._ AppleDouble files
on filesystems that do not natively support resource forks.
As of Mac OS X 10.4, --rsrc is default behavior.
[...]
--extattr Preserve extended attributes (requires --rsrc). As of Mac
OS X 10.5, --extattr is the default.
and nonetheless:
# ls -@delO /private/var/db/ConfigurationProfiles/Store
drwx------@ 5 root wheel datavault 160 Jan 20 2024 /private/var/db/ConfigurationProfiles/Store
*********
com.apple.rootless 28
***************************
# mkdir tmp
# ditto /private/var/db/ConfigurationProfiles tmp
ditto: /Users/alice/Security/Admin/Apple/APFS/tmp/Settings: Operation not permitted
ditto: /Users/alice/Security/Admin/Apple/APFS/tmp/Store: Operation not permitted
# ls -@delO tmp/Store
drwx------ 5 root wheel - 160 Aug 8 13:55 tmp/Store
*
#
The extended attribute on copied directory Store is empty, the file flags are missing, not preserved as documented and as usual behaviour of ditto was since a long time ( macOS 10.5 ).
cp, rsync, tar, cpio exhibit the same misbehaviour. But I was using ditto to be sure to avoid any incompatibility with the Apple FS propriaitary modifications.
As a consequence, all backup scripts and applications are failing more or less silently, and provide corrupted copies of files or directories. ( I was here investigating why one of my security backup shell script was making corrupted backups, and only on macOS ).
How to recover the standard behaviour --extattr working on modern macOS?
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Files and Storage
macOS
Security
Security Foundation
Is there a way to enumerate all files within a folder of an asset pack or just all files in general?
My application is using the Apple demo code to load a file from an Apple hosted asset pack:
let descriptor = try AssetPackManager.shared.descriptor(for: "NAV/NavData.db3")
defer {
try descriptor.close()
}
if let path = path(for: descriptor) {
self.database = try Database(path: path)
}
As my "Navigation Data" is updated each month with an updated asset pack I would like to have the name of the .db3 file reflect the current data cycle (e.g. NAV2601.db3, NAV2602.db3, ...)
Ideally I would like to iterate over all files within the NAV folder of the current asset pack and pick the most recent one.
Unfortunately, neither the AssetPackManager nor the AssetPack object seem to include an API for this.
It would be cool to have something like:
let files = try AssetPackManager.shared.files(for: "NAV/")
for file in files {
//Check and load
}
I’m currently facing a disk space limitation on my Mac.
I’ve already freed up some storage by following the suggestions shared in a previous post, which helped partially, but the issue is not fully resolved and space is still a bottleneck for my workflow.
To move forward, I’d like to ask a very concrete question:
Is it safe and supported to move Xcode to an external hard drive (SSD), use it from there, and simply connect the drive whenever I need to work with Xcode?
Specifically:
Are there known issues with performance, stability, or updates?
Are there components that must remain on the internal disk to avoid unexpected behavior?
Is this a reasonable long-term setup, or just a temporary workaround?
I want to make sure I’m not setting myself up for hidden problems down the road.
Thanks in advance for any clarification or best practices you can share.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Files and Storage
Developer Tools
External Accessory
Xcode
SMBClient-593 introduces a crtitical bug.
When reading and writing data at high volume, the SMBClient no longer properly receives and handle responses from the server.
In some cases, the client mishandles the response packet and the following errors are seen in the logs:
2025-12-02 21:36:04.774772-0700 localhost kernel[0]: (smbfs) smb2_smb_parse_write_one: Bad struct size: 0
2025-12-02 21:36:04.774776-0700 localhost kernel[0]: (smbfs) smb2_smb_write: smb2_smb_read_write_async failed with an error 72
2025-12-02 21:36:04.774777-0700 localhost kernel[0]: (smbfs) smbfs_do_strategy: file.txt: WRITE failed with an error of 72
In other cases, the client mishandles the response packet and becomes completely unresponsive, unable to send or receive additional messages, and a forced shutdown of the computer is required to recover.
This bug is only present on macos 26. We believe the operative change is in the latest commit, SMBClient-593 beginning at line now 3011 in smb_iod.c. The issue seems to be a race, and occurs much more frequently once throughput exceeds around 10Gbps, and again more frequently above 20Gbps.
I am developing a utility application for macOS. In the next version, I would like to access data files from multiple third-party web browsers.
However, requiring users to manually select and grant access to each browser’s folder individually would be inconvenient from a usability perspective. Therefore, I am considering requesting Full Disk Access for my app.
Is it realistic to expect App Store review approval when requesting Full Disk Access? Under what conditions or use cases is such permission typically accepted by Apple?
I would greatly appreciate any advice or experiences you can share.
Following an unexpected error message while working in Xcode, the project file xcodeproj is no longer synced in iCloud Drive.
The Finder shows a cloud icon with a ! and an error message : (NSFileProviderErrorDomain error -2005.)
If the local file is zipped, and unzipped elsewhere on iCloud Drive, then the unzipped file can still not be iCloud Synced.
Restoring the file from a Time Machine archive does not solve the issue.
Apple Care Support finds that iCloud Drive is working fine except for this xcodeproj file and says the issue is Xcode related.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Files and Storage
Developer Tools
Xcode
iCloud Drive
I. am working on an app that uses automounted files using nfsv4 where the server has zfs filesystems. As a test I've created a very simple example and the directory in question seems to automount correctly, but when I try to access it, I get strange behavior. The directory is mounted on is /System/Volumes/Data/mnt/subdir and I can change to that directory just fine. However I get the following:
63 rrsum@Anywhere:subdata% pwd
/System/Volumes/Data/mnt/subdata
64 rrsum@Anywhere:subdata% ls -la
total 3
drwxr-xr-x 3 nobody nobody 4 Jan 10 13:03 .
dr-xr-xr-x 3 root wheel 2 Jan 8 17:27 ..
drwxr-xr-x 2 nobody nobody 3 Jan 9 11:20 dir
-rw-r--r-- 1 nobody nobody 12 Jan 10 13:09 file.txt
65 rrsum@Anywhere:subdata% cd dir
cd: string not in pwd: ls
The directory appears in the 'ls -la' properly, but I cannot cd to it.
So I'm aware that Apple can designate a folder as a "data vault", and access to that folder is limited to applications that have a specific entitlement. I was wondering if there was an equivalent (or the same, I'm not fussy :) feature available to third parties, even if only during the app-store submission ?
To avoid the X-Y problem, what I want to do is have a launch agent with access to a SQLite database, and I want only that launch agent to have access. Any reads of the database will have to be done through an XPC call from the main user-facing application.
I want to store private data into that database, and I don't want there to be any way for any other application to read it. If there's a way to do that without data-vaults I'm all ears :)
I'm not sure if this is really the right place, perhaps the core-os forum would be better, but since the Apple solution is gate-kept by entitlements, I thought I'd start here :)
I am adding NSFileProviderPartialContentFetching support to an existing NSFileProviderReplicatedExtension. My backend has a high "Time To First Byte" latency (approx. 3 seconds) but reasonable throughput once the connection is established.
I am observing a critical behavior difference between Partial Content Fetching and standard Materialization that causes sequential reads (e.g., dd, Finder copies, Adobe apps) to fail with timeouts.
The Scenario: I have a 2.8 GB file. I attempt to read it sequentially using dd.
**Baseline (Working): Partial Fetching Disabled
**
I do not conform to NSFileProviderPartialContentFetching.
The system triggers fetchContents(for:version:request:completionHandler:).
My extension takes 3 seconds to connect, then streams the entire 2.8 GB file.
Result: Success. The OS waits patiently for the entire download (minutes) without timing out, then dd reads the file instantly from the local disk.
**The Issue: Partial Fetching Enabled
**
I add conformance to NSFileProviderPartialContentFetching.
The system requests small, aligned chunks (e.g., 16KB or 128KB).
My extension fetches the requested range. This takes ~3 seconds due to network latency.
The first few chunks succeed, but shortly after, the operation fails with Operation timed out.
It appears the VFS kernel watchdog treats these repeated 3-second delays during read() syscalls as a stalled drive and kills the operation.
**My Questions:
**
Is there a documented timeout limit for fetchPartialContents completion handlers? It seems strictly enforced (similar to a local disk I/O timeout) compared to the lenient timeout for full materialization.
Is NSFileProviderPartialContentFetching inherently unsuitable for high-latency backends (e.g., cold storage, slow handshakes), or is there a mechanism to signal "progress" to the kernel to reset the I/O watchdog during a slow partial fetch?
Does the system treat partial fetching as "Online/Direct I/O" (blocking the user application) whereas full fetch is treated as "Offline/Syncing" (pausing the application), explaining the difference in tolerance?
Any insights into the VFS lifecycle differences between these two modes would be appreciated.
Hi everyone,
I’m an iOS developer working on a Mac with limited storage (256 GB).
I’ve noticed that the ~/Library/Developer folder is taking up almost 90 GB, mainly due to Xcode-related content.
Inside it I see folders like:
Xcode/DerivedData
DocumentationCache
iOS DeviceSupport
UserData
CoreSimulator/Devices
Before deleting anything, I’d like to understand which of these folders are safe to clean up, and what the potential side effects might be (for example, rebuild times, simulator re-downloads, etc.).
What is the recommended best practice to manage disk space when using Xcode on a low-storage machine?
Thanks in advance for your help.
Happy new year to all!
I have created an iOS app that also runs on Apple Vision Pro.
On iOS, when you activate the fileImporter modal, you can swipe down the modal in iOS to dismiss.
However, in visionOS, this same modal CANNOT be swiped down to cancel/dismiss. If you are drilled deep into a file hierarchy, you have to navigate back to the top level to tap X to dismiss.
Is there a way to add swipe down to the visionOS implementation of fileImporter, or any other workaround so the user doesn't have to navigate back to the top to dismiss?
Again, this is not a visionOS app but an iOS app compatible for use in Vision Pro.
Thanks!
Issue
After upgrading to Tahoe 26.2, print queues monitored by PaperCut no longer work. The print queue gets paused, and the jobs fail to print.
This issue was discovered during our internal testing prior to the Tahoe 26.2 public release, and a growing number of our mutual customers have also reported it since then.
Root cause
This appears to be due to changes in the behavior of CUPS Sandbox restrictions, which prevent the backend (and filter) from reading/writing to the PaperCut install folder.
Error messages
From syslog.
2025-12-22 16:41:59.283761+1100 0x1daf61 Error 0x0 0 0 kernel: (Sandbox) Sandbox: papercut(5783) deny(1) file-write-data /Library/Printers/PaperCut/Print Provider/print-provider.log
When trying to create a TCP socket from the PaperCut filter.
2025-12-15 19:50:08,403 ERROR: os_tcp_socket_create: getaddrinfo failed: nodename nor servname provided, or not known
Technical details
PaperCut implements print queue monitoring using a CUPS backend (and filter).
CUPS backends and filters run in a security 'sandbox' which limits what they can do (such as file/folder access, create network sockets, and execute sub-processes, etc.).
The PaperCut backend (and filter) relies on some of these operations, so to function correctly, our code updates /etc/cups/cups-files.conf with "Sandboxing relaxed".
Until 26.2, this relaxed mode allowed us to read/write to PaperCut folders, create TCP sockets to communicate with the local PaperCut Application Server, and execute/kill sub-processes.
As an alternative to the relaxed mode, we also tried "Sandboxing off", but that doesn't help either (from CUPS scheduler/conf.h).
typedef enum
{
CUPSD_SANDBOXING_OFF, /* No sandboxing */
CUPSD_SANDBOXING_RELAXED, /* Relaxed sandboxing */
CUPSD_SANDBOXING_STRICT /* Strict sandboxing */
} cupsd_sandboxing_t;
Test code
We can provide a simplified version of our backend that demonstrates the issue if required
Questions
Has the CUPS sandbox relaxing changed? According to the CUPS man pages (cups-files.conf(5)), "Sandboxing relaxed" should still work as before.
If this is the new intended behavior, what are the other options/directives we can use to relax the limitations on CUPS backends and filters?
On macOS Tahoe, our application using the Endpoint Security Framework (ESF) observes that during file copies through finder application, DesktopServicesHelper unlinks the source file if the ESF authorization response is delayed for ~5 seconds, even though the authorization event deadline remains 15 seconds, indicating that the process does not wait for the full ESF deadline before deleting the file.
Before Tahoe, we didnt see this behaviour.
NSApplicationDelegate.application(_:open:) gets the files it needs to read from the file URLs given. There are similar older functions that use a String to identify the file. What format are those strings expecting? A path name? An URL?
I am currently encountering a problem: during the process of uploading a large file, I have moved the file that was not successfully uploaded to the trash can. These two operations have been tested to be serial (triggering the 'create Item' callback first, followed by the 'modify Item' callback), which means that the file must be uploaded before it can be moved to the recycle bin (which can also result in the file being stored in the cloud recycle bin). I want to implement: directly interrupt this upload process and then do not complete the upload. How can I achieve this? Please help me. Thank you
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Foundation
Swift
File Provider
Files and Storage