Paths to media broken after changing info.plist in standalone

Joseph's icon

Joseph

7月 23 2024 | 3:00 午後

Hello all,

I’ve built a standalone on my Mac that plays some mp3s and show a few pngs. I need to add a BundleName to my info.plist in order to comply with current Apple App Store guidelines, but any changes I make to the info.plist cause the media files used in my standalone to not be found.

This happens with any change to the plist includes adding the required field, but it also happens when simply changing a small amount of text in an existing field. It happens both when making changes with Xcode or using Text Edit.

This is happening prior to any codesigning.

So obviously I am missing something, but I don’t really understand the structure of the standalone or the function of the info.plist file. Any ideas how I can make my changes without breaking my app's paths?

Thanks,

Joseph

Standalone built with Max Version 8.6.2

MacOS 13.4 (Ventura)

Source Audio's icon

Source Audio

7月 23 2024 | 3:41 午後

You add bundle name in standalone inspector, to start with.

Also preferences name.

Where are this media files located ?

in the app subfolders ?

or elsewhere ?

Joseph's icon

Joseph

7月 23 2024 | 4:07 午後

Thanks for the reply!

I had added the Bundle Identifier and Preferences names in the standalone inspector, but I don't see a field there to add a Bundle Name. So I think I still need to edit the info.plist. I'd also like to be able to include my correct copyright and version info - so I'll still need to figure out how to edit it without losing paths.

But I think you are right on that I don't have my media assets where they should be. I don't see them in my standalone Contents anywhere, so that is likely where I am going wrong. I can't seem to figure out how to get them included correctly in the build. I've tried adding a folder during the build process, but that doesn't seem to have any effect. What is the correct way to include these?

Source Audio's icon

Source Audio

7月 23 2024 | 4:17 午後

if you want them inside of app bundle,

place them where I posted : into support folder

Joseph's icon

Joseph

7月 23 2024 | 4:26 午後

hmmm. I've tried manually placing them in xxx.app/Contents/resources/C74/support/, but I have the same issue when I make any change to the info.plist.

I get a max console window with the following errors:

error opening SCT_Treated.mp3, err -1

sfplay~: can't open audio file SCT_Treated.mp3

error opening SCT_003.mp3, err -1

sfplay~: can't open audio file SCT_003.mp3

error opening SCT_3rd_Gen.mp3, err -1

sfplay~: can't open audio file SCT_3rd_Gen.mp3

error opening 1SCTBlackAudioLouder(DEMO).mp3, err -1

sfplay~: can't open audio file 1SCTBlackAudioLouder(DEMO).mp3

error opening SCT_vocals.mp3, err -1

sfplay~: can't open audio file SCT_vocals.mp3

theme_constructor.js: Javascript ReferenceError: Dict is not defined, line 3

jit.movie: no such file in collective

fpic: can't load file SCT_slide1.png

fpic: can't load file soft crown icon.png

fpic: can't load file SCT_slide3.png

fpic: can't load file SCT_slide2.png

fpic: can't load file blurry_attempt_8_72dpi.png

sfplay~: no open file

Source Audio's icon

Source Audio

7月 23 2024 | 5:07 午後

I actually overlooked that you apply for apple store.

I don't know if adding media files to app resource bundle

is allowed.

One needs to sign the whole bunch at end.

I allways edit plist files for standalones and never had any issues,

I use plisteditpro to do that.

but I don't play that applestore game, only adhoc codesign if necessary.

Joseph's icon

Joseph

7月 23 2024 | 6:38 午後

yeah, the app store stuff is a downstream problem, for sure. I'm hoping I'll be fine to add or remove files prior to codesigning, but I'll cross that bridge if I ever come to it. Right now I need to figure out why changing the info.plist file has anything to do with my media resources.

I've successfully distributed this app via the web before, but it's been 10 years since I looked at it.

so...

I went back through the changes I made and I saw I was using absolute paths for all these files. Once I changed all the sfplay~ and fpic paths to relative paths these files survive the alteration of the change in the info.plist!

So the solution for me was use all relative paths. I included the support folder in the Build dialog and did not add it manually after the build was complete.

One thing I still don't understand...Where are these files in my built app? I'm assuming they must be in the file called myapp/Contents/Resources/myapp.mxf since that file is only a few KB bigger than my media folder. But I'd love to have this confirmed or be corrected.

Source Audio's icon

Source Audio

7月 24 2024 | 3:01 午後

They are included into mxf file.

I don't know if that is a better way than to place folder with files into resources folder.

I think for you main thing is to pass codesigning and apple approval.

less where the files are.

Joseph's icon

Joseph

7月 24 2024 | 5:55 午後

Thanks for the confirmation of where my files are!

So far, getting that cleared up has allowed me to update my info.plist without breaking the functioning of my app - so the problem that started this thread is resolved!

I've also now successfully codesigned and submitted for review, so I'll jump into one of those massive App Store threads or start a new one when I trip over the next hurdle (unless, of course, the hurdle is related to my file paths).

Thanks for the help!

Joseph

Joseph's icon

Joseph

7月 26 2024 | 5:00 午後

Update: The app was approved by the app store. Once my paths were fixed I was able to update my info.plist, then I followed the instructions from this thread: https://cycling74.com/forums/max-standalone-in-the-app-store-2022-23

The code signing was process was still a bit detailed and arcane for my non-dev brain, but it was much easier than what I encountered a decade ago!