Very Newest Macs Crashing My App - Xojo update coming?

none of this means that it is or is not being translocated on different machines.
why are you unwilling to attempt to fix it as been suggested?

I stand corrected. It happens on other apps too. Do a web search on “macOS app translocation”, where my top search result is this which says in part:

This is caused by very irritating security changes made by Apple. ElCap - huh, I was developing under Mavericks when I got bitten by this and I wish I could have stayed there grumble grumble.

[quote=455743:@Dave S]none of this means that it is or is not being translocated on different machines.
why are you unwilling to attempt to fix it as been suggested?[/quote]

I don’t understand what fix you are suggesting. Thats why I asked where I can find what the recommended method is.

Move your data files to the proper location as mentioned multiple times in preceding comments

To summarize what’s been mentioned before -

You need to create a folder in “/Library/Application Support/” or “~/Library/Application Support/” (depending on whether your settings/license are global or user-specific) on macOS.

For example, our BRU Producer’s Edition uses “/Library/Application Support/BRU PE/” on the Mac, "C:\ProgramData\TOLIS Group\BRU PE" on Windows, and “/usr/local/share/BRU PE/” on Linux. Each of those folders - since they hold no “secure” information are set to 1777 for permissions (world writable with sticky bit set) on macOS and Linux and as belonging to the “Backup Operators” group on Windows.

Nothing is kept in the actual application path that must be writable on any platform.

[quote=455758:@Tim Jones]For example, our BRU Producer’s Edition uses “/Library/Application Support/BRU PE/” on the Mac, “C:\ProgramData\TOLIS Group\BRU PE” on Windows, and “/usr/local/share/BRU PE/” on Linux. Each of those folders - since they hold no “secure” information are set to 1777 for permissions (world writable with sticky bit set) on macOS and Linux and as belonging to the “Backup Operators” group on Windows.

Nothing is kept in the actual application path that must be writable on any platform.[/quote]

How do you locate that directory/folder from within the code? I believe the Mac has some bizarre character string to represent a directory address. When I go to open a file from a specific directory where the user saves a file, I save that character string, and use it as a reference later. I could probably do something like that on my own Mac, but how would I be assured, that this character string would work on a different Mac, even given the same folder name in the Application Support folder?

SpecialFolder.ApplicationData.Child(“MyCompany”).Child(“MyApp”)

Keep in mind that any of the folders, even ApplicationData, may not exist so you’ll need to check and (if necessary) create each component.

Its a bad idea to try to build up a path from strings, especially if you are more familiar with WIndows or Mac or vice versa.
Folderitem uses .child to refer to the parentage.
Xojo handles the underlying filename syntax.

[code]dim f as folderitem

f = specialfolder.applicationdata
if f = nil then
msgbox “cant fix this, but shouldnt happen”
exit sub
end if
if not f.exists then
try
f.createasfolder
catch
msgbox “failed to create missing applicationdata folder: shouldnt fail, but…”
exit sub
end try
end if

f = f.child(“MyCompany”)
if not (f.exists) then f.createasfolder

f = f.child(“MyApp”)
if not (f.exists) then f.createasfolder

f = f.child(“Mysettings.txt”)

if not (f.exists) then
//create a default settings file
end if

//open settings file and do stuff with it
[/code]

Thank you very much. I am going give it a try.

Start by looking here:

https://documentation.xojo.com/api/files/specialfolder.html

This will tell you what all the OS-managed places are (and where they are on the specific platform). But you don’t really need to know where they are actually located, just what the purpose is. That allows you to decide which one to use for a particular purpose, and how to refer to it in a platform independent way.

I put all my app’s data for the user in a folder in his documents folder. So, I start by doing:

[code]Dim f, fptr as folderitem

f = SpecialFolder.Documents
[/code]

Now I need to see if the folder for my app’s data exists already, and create it if not, thus:

fptr = GetFolderItem (f.NativePath + "myAppData", FolderItem.PathTypeNative) if (fptr.Exists=false) then fptr.CreateAsFolder () if (fptr.Exists=false) then msgbox ("Unable to create myAppData folder") quit end if end if

Then I do some more checks, such as to verify that the folder can be read from and written to.

[code]if (fptr.isReadable=false) then
msgbox (“Unable to read from myAppData folder”)
quit
end if

if (fptr.isWriteable=false) then
msgbox (“Unable to write to myAppData folder”)
quit
end if
[/code]

That’s it.