Is there a difference between Intel Macs and M1 Macs?

An app that deals with an SQLite DB located into SpecialFolder.ApplicationData.Child(“XXXX”) works well with the iMac running Catalina on an Intel chip.
I copy the app and copy the DB into the ApplicationSupport Folder within thw MacBook running Monterey on an M1 chip and I get a plethora of errors: DB not opened, RecordSet not working, etc.
Both folder paths are named exactly the same and have the same location (albeit on two different computers).
Moreover, I copied a slightly modified app into the MacBook (just added a button, nothing else) and, while the old one used to work, this new one gives me the said errors.
I cannot figure out why this happens unless Xojo deals with SpecialFolder.ApplicationData in a way on Catalina and a different way in Monterey or, Intel and M1 chips.

There’s much more “differences” from Catalina to Monterey, than Intel to M1.

Shouldn’t it be a direct open if I specify the path with: SpecialFolder.ApplicationData.Child.(xxx)?

You should create an app FOLDER at SpecialFolder.ApplicationData, and under it put your files, are you doing it?

I mean something like
SpecialFolder.ApplicationData.Child("sorbi_app_whatever").child("mysorbidb.sqlite")

1 Like

Maybe a problem with files in quarantine? Copying files to another computer will activate the quarantine bit and prevent those files from being opened.
Just try to remove the quarantine bit from the db file and then try again to open it. You can use Sam Rowlands "Permission Reset " or my “Ausbruch” (website is in german) to do that…

My guess is that he is trying to create a file at the root of ApplicationData, and the increased security in Monterey is blocking him.

That’s what I did.
It is: SpecialFolder.ApplicationData.Child(“XOJO PROGRAMS”).Child(“Eisen.sqlite”)
It keeps on telling me that th DB is closed while it works perfectly on the iMac (same app)

Xojo 2021r3.1

I tried with Permission reset. No change

Var f As FolderItem = SpecialFolder.ApplicationData.Child(“XOJO PROGRAMS”).Child(“Eisen.sqlite”)
break

Inspect f properties. Exists, Read, Write, Errorcode, Permissions, etc.

Compare differences of f in Catalina and Monterey

I just tested it.
Moving the DB in a folder inside “Documents” everything works fine. Not so if I leave it in Application Support.
Strange

That’s not the way an app should run unless designed to expose some files in documents.
I insist you should try to find where is the fail between your app and Monterey M1.

Also, don’t use a generic name folder as “XOJO PROGRAMS” for your app. Use one specifically tailored for that ONE app. Also don’t use spaces. Apple “likes” folders as “com.mydomainidentification.myspecificapplicationname” like “com.sorbiapps.myeisenapp”

The only glitch I see is that the app asks for a permission to access files inside the Documento folder. Is there a way to prevent such a request?

Agree but I wouldn’t know how to do it

Do this research and post here what you found

Also change the folder name to a better standard, that should be created by your app, not manually.

Yes.

Actually “XOJO PROGRAMS” is a container for other folders specific to each single DB.

May I ask how?

You can, but if I do not gave it it is because I only remember having asked in this foruml, get an answer, implemented it, but in what project ?

Do you have AppWrapper ?

This is a bad name choice, unless it is just tool used only by you, and no other Xojo user invents to create a folder named “XOJO PROGRAMS” that you download from somewhere and you guys clash contents and some of you will have things broken.