Mac Studio 2022 - SpecialFolder

I have an app that stores user-create data in the recommended SpecialFolder.ApplicationData for both Mac and Windows. This has been working fine through many interactions of Mac OSX and Windows.

Today I have a customer who has of the very new Mac Studios. She has tried to copy her old data from a MacBook Air to the new Mac Studio. But my app can’t find the data on the Mac Studio. I’m not sure what version of Mac OSX the Mac Studio is using, I will ask.

Has anyone had this experience? Is the recommended Application Data (sandboxed) folder different on iMacs/Macbooks to the Mac Studio?

Has she put the folder at the same place as is on the MacBook Air (~/useraccount/Library/Application Support/) ?

I have a Restore feature in my app that automatically chooses where to load the user data file. I have set that as the default sandboxed ~/useraccount/Library/Application Support/ directory. The user never has to type out the path, so it avoids typo mistakes.

Is it possible that the app isn’t sandboxed on the Studio and it is loading into the non-sandboxed ~/useraccount/Library/Application Support/ folder? I used AppWrapper to wrap my app, I can’t see why the Mac Studio wouldn’t recognise the wrap.

Yeah, that happens from time to time. Create the folder manually. Restart the computer. Simply try again.

Sandboxed or not, your code should always use

A sandboxed app gets it’s own private version of that folder.
But I have a feeling that a translocated app gets given a pseudo-sandboxed environment with a different path yet again.

Have it display a message box with the path given by
If its full of random looking characters, the app is being run translocated

I think @Jeff_Tullin has the right idea.

Another shot in the dark: on M1 macs, some Containers have a different name, e.g. there will be

  • ~/Library/Containers/SomeApp (for a M1 native app running on M1)
  • ~/Library/Containers/SomeApp-x86_64 (for an Intel app running on M1)

If you are creating the path using strings, that could be a problem.

1 Like