Mac Sandbox & SQLite database access

A sandboxed app can access a sqlite database on the Mac Desktop without requiring a confirmation for each save. Is this new or standard behavior?

I ask because when I started experimenting with sandboxing a few months ago, the databases that I could previously access on the Desktop or in Documents would display a confirmation each time they were modified when sandboxing was turned on. Using SpecialFolder.ApplicationData to find a suitable datafile location made the confirmation dialog stop appearing. Apple’s App Store folks were not initailly comfortable with that choice of the datafile location, but let it slide when I described the above problem.

Now I notice (coincidentally after updating to Tahoe 26.01 and using Xojo 2025.2.1) the confirmation dialogs have stopped appearing when updating records in databases on the Desktop or in the Documents folder.

So I’m wondering if, mislead by my inexperience, I formed some wrong impressions a while back or has something changed recently?

You did something wrong before and now you are accessing the database correctly? I would delete such an app immediately. Of course, no dialog is shown for every write even with sandboxing.

1 Like

With sandboxing on, I was getting “unable to open database file” when using RowSet.SaveRow when the file was located in ~/keith/Documents. The records could only be read. I think this is the expected behavior?

My confusion came from the way I misunderstood how to use:
Var FolderDlg As New SaveFileDialog
FolderDlg.InitialFolder=SpecialFolder.Documents

SpecialFolder.Documents and FolderDlg.InitialFolder have paths in the Container when sandboxing is on. However accepting the dialog: vFile = FolderDlg.ShowModal created a vFile that was in the regular Documents folder. That is the file I incorrectly assumed was being used. The absence of errors was the “new behavior”, but record updates were actually going to an old datafile in the Container that SpecialFolder.Documents referred to.