Accessing the caches directory via an Xcode Project.
let cachesDir = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first!
print(cachesDir)
// file:///Users/your-mac-username-here/Library/Caches/
With the path from the printed path above you will now be able to search using the Finder app or (command, space bar) on your mac for the particular cache folder you are interested in.
For example, if you’re interested in accessing the “XCTest” cache folder, the name would be com.apple.dt.xctest.tool.
A possible full path for com.apple.dt.xctest.tool depending on your mac’s configuration and using Finder or (command, space bar) could be: file:///Users/your-mac-username-here/Library/Caches/com.apple.dt.xctest.tool
Being able to isolate the caching system during TDD is a flow I’ve acquired from the iOS Lead Essential Developer program.