Okay, so I’ve finally finished my beta testing and I’m ready to submit this thing to the app store, but I’ve hit a snag with productbuild and some data files I’m using.
The data files in question are basically just objects that I’ve serialised to disk (from a custom editor that I created . . . it’s an in-house utility, not intended to be distributed). I have to copy the data files to the app bundle after Unity builds the game, but I do that before any signing. I did all of the code signing, including libmono.0.dylib and so forth, got the entitlements and the sandboxing working perfectly, and did the chmod to make all of the permissions right. The app works perfectly at this point. I created the installer package, and as a test, ran the installer. As a side note, the data files never need to be modified once the app is deployed.
The app doesn’t load ANY of the data files after it’s installed. I noticed that the permissions are different on the data folders, but they seem to be the same as the permissions on all of the other apps in my Applications folder. Just as a test, I took the same installer and installed on my MBP, with the same results. If I copy the data folders from my source tree, to the post-install data folder, it starts working correctly. It only starts working correctly if I copy the folders and the files, and not just the data files.
One other thing I noticed is that if I click Get Info on the data folders from the installed app bundle, it doesn’t display the number of files correctly. It displays the amount of disk space occupied correctly, but shows the number of items to be zero. It shows correctly in the original exported app bundle and in the source tree.
I’m storing the data files in the Resources folder of the application bundle. It doesn’t seem like this should make a difference, but you never know. So I decided to experiment, and moved them to the Data folder instead. Also tried putting them in thier own folders under Contents. Either one of these configurations results in not working after signing. I’m starting to think it may have something to do with the code signing process, but I don’t have any idea where to start troubleshooting that.
What’s going on here? Am I skipping a step somewhere? Is there a different way I should be storing objects on disk? Am I doing this entirely the wrong way?
I’m starting to run out of hair, and I didn’t really have much to begin with.