Chapter 9: Difficulty finding my Sandbox

I had a hard time finding my Data folder. I am writing this in case others are having problems.

When I originally created the project I used my developer account info. So, using Terminal, I found the folder /Users/[myname]/Library/Containers/Time-ato. Even after locating it via Terminal, I could not see it in Finder.

In Terminal, I typed “pwd” (for print working directory), captured the text and pasted it into Finder → Go → Go to Folder…

Now I could examine the directory in Finder. I do not know why Finder isn’t listing it in the Containers directory. I do have “Show all filename extensions” checked in Finder preferences. macOS 12.4. Finder version 12.3 (That’s weird!). I notice that in my macOS Preferences → Security & Privacy → Privacy and Full Disk Access the Terminal app is checked. I don’t see where Finder would be set.

Be sure you’ve turned on the display of hidden files and folders in Finder. By default, it’s off. The quickest way is the keyboard shortcut Shift-Command-. (that’s the period on the keyboard).

1 Like

Finder does some really strange things with the Containers folder.

This results in multiple folders with the same apparent name and although I had not noticed any hidden folders, this may be more of the same problem.

If in doubt, use Terminal which will always give you the exact data.

1 Like

Hi @sxbsxb (Steve),
Here is a cool tip that you can use from the terminal and not have to do all of the copy paste steps.

If you are in the folder in terminal, simply enter the command open . and it will open the current directory in finder for you.

Hope that helps,

Cheers,

Jayant

Thanks Sarah, et al,

I have tried to get to the bottom of this, and from comments I have seen elsewhere, it appears that Apple does not want you to be mucking around in the Containers folder with Finder. A user’s Containers folder is where all applications’ Sandboxes exist. I assume that’s because of the security issues that would exist if one Sandbox could see the contents of another Sandbox.

In Finder, regardless of showing hidden files via Shift-Command-., I cannot see ~/Library/Containers. Finder does not show that Folder for me. One can go there in Finder with Go → Go To Folder…

In Terminal the sandbox directory for Time-ato has extended attributes (that “@” character below).

drwx------@ 5 myuserid staff 160 May 23 09:39 com.myname.Time-ato

What the extended attributes do in this case, is change the name of the folder Finder shows (after one has navigated to ~/Library/Containers) from com.myname.Time-ato to simply Time-ato. The full name exists in Terminal and in the folder’s “Get Info”.

As you mentioned Sarah, Finder shows multiple folders with the same apparent name in ~/Library/Containers. For example, I have three folders named “Shortcuts”. Get Info tells me the three folders are really named:

com.apple.ActionKit.BundledIntentHandler
com.apple.shortcuts
com.apple.WorkflowKit.ShortcutsIntents

I have worked with Linux for decades on thousands of computers and dozens of platform types and I am not used to this deliberate obfuscation. Oh well. It’s probably well-intentioned. I can live with it and sorry for the distractions. One does not need yet another time-consuming rathole to distract from real progress. :smiley:

Apple doesn’t want you to get into the Library folder, and I can see their reasoning since it’s possible to wreck your system by doing things in there.

However this obfuscation of the Containers folder is new in Monterey and it’s very strange. Given that the Library folder is already hidden, I see no reason to make this folder more confusing.

But that’s what they’ve done and we have to work with it. as I said in the book “Finder is lying to you, but Terminal never lies” :smile: