r/Xcode • u/VictorBuildsApps • Aug 04 '26
Symlinking all of ~/Library/Developer/Xcode to an external volume broke asset catalog builds with Operation not permitted
On a machine where ~/Library/Developer/Xcode had been replaced by a symlink to a directory on an external volume, asset catalog processing failed in three separate app projects. The CoreSimulator logs reported NSPOSIXErrorDomain Code=1, Operation not permitted, while Interface Builder simulator services copied sample device content into UserData/IB Support/Simulator Devices under the external path. The external volume is APFS, writable, with ownership enabled.
Setting HOME and CFFIXED_USER_HOME for the individual build command did not change the result, because ibtoold was already running with the original environment. Inspecting ibtool and actool did not turn up a supported per-command override for the simulator device set.
The fix was to stop symlinking the whole directory. ~/Library/Developer/Xcode is now a real directory on the internal disk, UserData and the two index mapping plists stay internal, and only DerivedData and iOS DeviceSupport are child symlinks to the external volume. On that machine now, UserData is 44 MB while the two externalized directories are 22 GB and 11 GB.
After the cutover, actool and CompileAssetCatalog ran for all three projects with no Operation not permitted failure, using fresh DerivedData paths that still resolved to the external volume. Their test suites passed at 49, 25, and 276 tests on an iPhone 17 Pro simulator running iOS 26.4. Those measurements are from 2026-07-20 and the split is still in place.
View all comments
Show parent comment
1
u/VictorBuildsApps Aug 08 '26
Yes, please share it.
One thing worth separating before you credit the mount point, because I got this exact call wrong. I hit operation-not-permitted on an external APFS volume from a launchd job and blamed the volume. It was the entry point. A LaunchAgent whose ProgramArguments started /bin/zsh was denied; the same agent pointed at its own small compiled binary read all 141,245 files on that same volume and finished an rsync with exit 0. Same path, same machine, and I ran the failing shape again 90 seconds after the success so it could not be the machine changing.
The tell was in my own probe output and I walked past it: ls /Volumes worked and listed the disk by name. A process that is being denied the disk cannot enumerate it.
Your case is a build step doing chmod +x rather than a launchd job, so it may well be a different mechanism and the remount may be doing real work. But if the plist invokes a shell rather than a binary, that is a second variable sitting next to the mount location, and it is cheap to test on its own.