Files in project's "data" folder not included in standalone app for macOS

Patrick Hund's icon

I have a project for a standalone app. My project's "data" folder contains some snapshot and JSON files that I use to initialise the app when it starts up:

Using a node.codebox object, the files get copied to a folder in the user's "Music" folder on their local file system.

I build the standalone app using "Manage project" > "Build collective / application".

When Max is building the standalone, in the console, I can see an "adding file" log statement for each of the files in the data folder.

However, the resulting standalone app does not seem to contain any of these files. As I understand it, they should show up in the "Resources" folder within the app folder, but they are not there, and my standalone app crashes on startup because it can't find the files.

Neither did I find the files in the "Application Support" folder for my app.

I've tried adding a "standalone" object to my main patcher with attributes @copysupport 1 @usesearchpath 1.

I've also tried adding the path to the data folder explicitly to the project search paths, checking "embedded".

All to no avail…

I use some other JSON files in the data folder to import into dict objects. This works just fine in the standalone, so I guess the files from "data" are there somewhere, but not where I expect them, so my Node script to copy them fails.

Can someone point me in the right direction? It's probably a beginner's mistake, but I'm at my wits end. Thank you!