I mounted a ZIP from a sandboxed Mac app with FSKit, and I'm not shipping it
On macOS 27, a sandboxed Mac app can mount a ZIP as a real volume. I built one: turn on its extension once, pick a file, click a button, and the mount call returns in 0.09 seconds with the archive on the Desktop. Terminal reads it, Finder lists it, Quick Look thumbnails it, and writes get “Read-only file system”.
I’m not adding it to Purrchiver yet. The spike answered most of what I asked it, though not the App Store question, and the answers are the reason. Everything here is as of November 2026, from one MacBook on macOS 27.2.
The idea
To use one file from an archive you extract it first, which costs time and disk, and only then can other programs read it. Mounting skips that: the archive shows up as a volume and any program reads the files in place. mount-archive, a FUSE tool on libarchive, prompted the question.
FUSE is a poor fit for an App Store archive app. macFUSE’s kernel backend means enabling kernel extensions in Recovery and restarting. Its FSKit backend avoids that, but it’s still a separate package to install before you can open an archive.
So I went straight to FSKit. It runs a file system in user space as an app extension, and Apple describes that extension as “compatible with Mac App Store distribution”. Purrchiver is sandboxed and only on the App Store, so the sandbox could have ended this on its own.
What I built
A small SwiftUI app and a read-only FSKit extension, both sandboxed, handling ZIP only. I wrote a little ZIP reader instead of using Purrchiver’s libarchive, so the spike says nothing about libarchive behind a mount.
The mount is one call:
let resource = FSPathURLResource(url: archive, writable: false)
let path = try await FSClient.shared.mountSingleVolume(
resource: resource, bundleID: extensionID, options: ["-o", "rdonly"])archive is the security-scoped URL from an Open panel. FSKit passes it to the
extension, whose log confirmed it arrived security-scoped. The extension needs
FSRequiresSecurityScopedPathURLResources in its Info.plist and has to call
startAccessingSecurityScopedResource() itself.
What worked
- Mounting from the sandbox: 0.09 seconds on a small ZIP, at
/Volumes/<name>. It appeared on the Desktop by itself. - Other programs: Terminal, Python seeks into the middle of a file, a Finder listing, and a Quick Look thumbnail.
- The bytes: all 301 files in a 1.1 GB ZIP matched their originals by SHA-256.
- Refusing writes:
touch,rmandchmodall got “Read-only file system”. - Staying up: the mount survived quitting the app, and moving or deleting the
source ZIP, because the extension holds the file open. Finder’s Eject works.
FSClienthas no unmount call, and I didn’t test another way from the sandbox.
An encrypted entry was listed, but reading it got “Permission denied”, because I built no way to ask for a password. Development signing also gave me both FSKit entitlements with no request to Apple. That’s development signing only.
The floor is probably macOS 27
The mount call is new, and it sets the floor. The API column is from Apple’s SDK headers, and the last column is what I saw:
| macOS | What FSKit offers | Can a sandboxed app mount? |
|---|---|---|
| Below 15.4 | No FSKit | No |
| 15.4 to 15.x | Block devices only | Not run. hdiutil failed from the sandbox on 27.2 |
| 26 | FSPathURLResource, no mount call for apps | Not run. mount failed from the sandbox on 27.2 |
| 27.0 and up | FSClient.mountSingleVolume | Expected. Measured only on 27.2 |
I tried two other routes from inside the sandboxed app, on 27.2:
/sbin/mount -F -t zipspikefailed with “Couldn’t communicate with a helper application”. The same command works from Terminal.- Attaching the ZIP as a raw block device with
hdiutilfailed with “Device not configured”.
There may be others, such as DiskArbitration, which I didn’t try. So I expect the
floor to be macOS 27, though I haven’t run 15, 26 or 27.0. Purrchiver supports 14.6
and up, so this would be for the newest systems only. It should hide behind
#available(macOS 27, *), and a small test binary targeting 14.6 links FSKit weakly
on both architectures, but I never launched that on an older system.
ZIP needs a cache too
I’d assumed ZIP was the easy format, because you can jump straight to any file. You can, but you can’t jump to a position inside a compressed file: deflate has to be decompressed from the start of the file up to that point. The simple approach, which is what I built, decompresses the whole file to a cache on its first read.
Here’s a 1.1 GB ZIP holding a 1.18 GB file, half of it random, and 300 small files, 1.7 GB unpacked. Rough numbers, with the ZIP warm in the OS file cache. The first-read, later-read and every-file rows are three runs each, and the rest are single runs:
| Task | Mounted | Extracting |
|---|---|---|
| List the contents | 0.02 s | 0.02 s (unzip -l) |
| One small file | 0.07 s | 0.03 s (unzip) |
| 4 KB from the big file, first read | 1.15 s and 1.1 GB of cache | 5.7 s for that file (unzip) |
| The same file, later reads | 0.02 s | An ordinary file |
| The same 4 KB with the file stored, not compressed | 0.02 s, no cache | n/a |
| Every file | 3.0 to 3.2 s | 0.9 to 1.0 s (ditto), 8.4 to 8.5 s (unzip) |
The extraction tool matters more than I expected. Against ditto, the first 4 KB of
that one file took about as long as extracting the entire archive, and reading
everything through the mount was three times slower. Mounting wins for a quick look
around, and loses once you read a lot.
The cache reached 1.7 GB after reading every file, about what extracting uses. It’s removed on unmount, but until then it grows with whatever reads the volume. A real version needs a size limit and eviction, because even an honest ZIP can expand past the free disk.
tar.gz and solid 7z or RAR would be harder, since they decompress from the start of
the archive or solid block to reach a file. I didn’t try those.
Why I’m not building it now
- The App Store. Apple says the extension is compatible with App Store distribution. I found nothing that says the same for the app’s mount entitlement, and I haven’t tested distribution signing or App Review. I stopped before that test, which needs a new App Store Connect record and a build, because the rest was enough for now.
- A setup step, on the newest systems only. Before the first mount, the user turns the extension on in System Settings. On macOS 27 the app can open that pane, but the user still flips the switch. A reply on Apple’s forums reported mounts failing after a Sparkle update on 26.4.1 until the developer toggled it; Apple’s DTS engineer said that shouldn’t be necessary and that he believes a bug is on file. I don’t know what an App Store update does.
- The cache. It needs a limit and eviction. Encrypted archives add the question of how long decrypted data may sit on disk, and I haven’t tested what a crashed extension leaves behind.
- Reliability. My hashes matched, but on short runs. macFUSE’s 5.5.0 release mitigates “a data corruption issue in FSKit on macOS 26 and 27”, involving empty and short reads, and my prototype doesn’t have that mitigation.
- The harder formats. I tested only ZIP, the easiest case.
tar.gzand solid archives are untested.
The idea also came from seeing mount-archive, not from a user. I’d look again once macOS 27 is common among Purrchiver’s users and people are asking, and I’d start with the App Store question, because if that route is closed the rest doesn’t matter.
If you try this anyway
The extension’s switch is at System Settings > General > Login Items & Extensions > By Category > File System Extensions.
- “No such file or directory” at the probe: with
FSSupportsBlockResourcestrue in the extension’sInfo.plist, my path mount failed this way. False fixed it. - “Unable to invoke task”: after I removed the empty
FSMediaTypesandFSPersonalitiesdictionaries, FSKit logged that it had no extension with that name, thoughpluginkitstill listed it. Restoring them fixed it. I saw this once. - “Module … is disabled!”: a rebuild that changed
Info.plistturned the extension off, and a code-only rebuild didn’t. - I/O errors at about 250 files: my first cache kept one file open per cached entry. That one was my bug.
Would you turn on a System Settings extension to browse a ZIP without extracting it, or is that already too much to ask?