Handle Different Operating Systems

From Xojo Documentation

How can I check whether the user is running on Windows, macOS, Linux or Raspberry Pi?

The compilation constants tell you which OS the app is currently running on.

If TargetWindows Then
// Running on Windows
ElseIf TargetMacOS Then
// Running on macOS
ElseIf TargetLinux And TargetARM Then
// Running on Raspberry Pi
ElseIf TargetLinux Then
// Running on Linux
ElseIf TargetiOS Then
// Running on iOS
End If

On macOS, examples projects do not appear in the Project Chooser and Plugins are not loading. How can I fix this?

Newer versions of macOS are supposed to remove the "quarantine attribute" once the code signature for an app has been verified. There are times when macOS does not do this properly, resulting in the inaccessibility of files and folders that are stored alongside the app. If this happens with Xojo itself, then the symptoms described above occur. The fix is to manually remove the quarantine attribute. Make sure Xojo is not running, start the Terminal and switch to the folder containing Xojo and run this command:

xattr -d

You can now restart Xojo and you should now see the examples and the plugins should load.