According to the Xojo Docs, SpecialFolder.ShareApplicationData should point to /Library/Application Support but in Ventura I am seeing that is not the case. Instead I am getting /Users/UserName/Library/Application Support
Anyone else see this? I’m thinking I need to report it as a bug.
I wouldn’t use a text literal. Apple could easily move that location and your app could stop working.
Think about what happened when APFS came along. Now there’s two Applications directories. One that’s protected on the system volume and one that’s for user-installed applications. I wouldn’t put it past Apple to make the same distinction for its own apps one day.
The other difference with the example project I supplied is that you have access to all four domains (User, Local, Network and System) because which domain you use changes where the files are. If your user were using a mac that’s managed by JAMF, the location of user files could be vastly different than what is on your developer machine and only the system calls will tell you where that is.
I’m interested in how you are seeing this “bug.” I’ve found it was a problem in my code. Here’s what I have in a test project:
Dim f as FolderItem
#IF TargetLinux or TargetArm Then
f = SpecialFolder.ApplicationData.Child("JustAddSoftware")
#Else
fr = SpecialFolder.SharedApplicationData.Child("JustAddSoftware")
#Endif
f.open
Since Xojo is now allowing 64 bit ARM compiles and since I am running on Apple Silicon, the TargetARM directive takes over…
I’m seeing things work correctly now that I’m not pointing to a different directory with the TargetArm directive. I originally put that in there because of RaspberryPi support.
Fair point; I was reading too fast. So I repeat myself with the correct item:
While that’s true, SpecialFolder.SharedApplicationData is worse while it’s broken.
The problem was that I had a “TargetARM” directive in my code to use a different directory. This was originally put in my code for RaspberryPi devices. But now that Xojo supports 64 bit compilation on all ARM devices, TargetARM is now Xplat. So it includes RaspberryPi, Linux, Windows ARM, iOS, Apple Silicon, etc.