Hello,
I am able to reproduce the issue with access permission on a fresh Xcode project.
This is the error I get:
"The file theFile.json couldn’t be opened because you don’t have permission to view it."
"Error Domain=NSCocoaErrorDomain Code=257"
"NSUnderlyingError=0x600000ce6040 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"
My setup is
Xcode16 and Xcode15.4 in Applications (named Xcode16 and Xcode respectively)
macOS Sonoma 14.7
Full disk access is given to Xcode.
My original problem appeared in a Swift package structure
SwiftPackage
-- Sources
-- Tests
---- PackageTests
------ Resources
-------- theFile.json
------ TheUnitTest.swift // file where I try loading theFile.json
If I understand correctly based on the reading material
my issue is with one of these.
App Sandbox or Mandatory access control (MAC)
I am running the tests from Xcode. Any help appreciated.
Thank you!
Topic:
App & System Services
SubTopic:
Core OS
Tags: