Use "Specialfolder.Applications" on 10.15

I’m using Xojo2019r3.1 on MacOS 10.15.4. Specialfolder.Applications should return /Applications, but in 10.15, it now returns /System/Applications.
What would I best do to solve this problem?
Should I use FoldetItem("/Applications") instead of Specialfolder.Applications?

What do you want to do with the Applications folder?

In Catalina, Apple’s apps are installed in /System/Applications/ while 3rd party applications are installed in /Applications/. Supposedly this makes them more secure, but in reality it just makes it harder to get the unwanted default apps off the machine.

Thanks. Was /System/Applications used from Catalina?
I need /Applications because I’m trying to find a third party application. I usually use Windows, so I don’t know much about Mac.

Applications don’t need to live in the applications folder.

macOS has a database called LaunchServices which contains the information you want. You can use declares or a plugin called MBS. Here is the function you need: https://www.monkeybreadsoftware.net/global-launchservicesfindapplicationforinfombs.shtml .

On the Mac you have (at least) the following options:

  • find it by the app’s BundleID (the preferred way)
  • try to find it in one of the system defined application directories (*)

(*) Sam has already mentioned there are 2 “Applications” folders now in Catalina.
There have been threads discussing that - but I could only find those in PreRelease channels…
Anyway - here is an example project you can look at. It shows how to find an app by BundleID, how to get the full list of all application directories - and how to find a suitable application that could/should be able to open a file (or an url).

Thank you both.
I can’t use my MacBook while it’s charging, so I’ll try tomorrow on the method you taught me.

I didn’t go into detail, but I’m maintaining a tool to determine the version of an Adobe document and open it in the correct version of the application.
For example, select the appropriate version from multiple versions of InDesign application installed on the machine and launch it.
For that I need to list all versions of InDesign.
I think LSCopyApplicationURLsForBundleIdentifier taught by Jürg Otter is suitable for that purpose.
LaunchServicesApplicationsForItemMBS, which I learned from Beatrix Willius, seems to be able to achieve the goal, but I felt that LSCopyApplicationURLsForBundleIdentifier is more direct and simple.
Thank you both. I’m really excited to find that Xojo can also perform very advanced processing.
Especially, I learned a little about how to use Declare. I’m using Declare on DotNet, but I didn’t know much about it on Xojo, so it was very helpful.