MacOS – What happens if you create another folder alongside the Contents folder in an application bundle

applicationsfilesystemmacos

I know the icons representing programs that end in .app are really a specially treated folder, and not a single file. And inside that folder, there is a folder called Contents, and in that folder lies all the guts of an application.

If one wanted to store information about an application (say, notes to oneself about crashes, workflows, or projects involving that application), just how bad of an idea would it be to create another folder inside the application bundle alongside the Contents folder? Would it break code signing? Make the folder stop behaving like an application bundle? Have no adverse side effects at all? Will folders inside the app bundle but outside Contents get clobbered in an app upgrade?

For instance, I bought Byword from the app store.
I have /Applications/Byword.app on my computer. /Applications/Byword.app/Contents/* contains the application itself. Could I create /Applications/Byword.app/My notes/* and store my own comments about the application there?

Best Answer

It wouldn't be that bad except for the whole completely using app packaging completely incorrectly. Anything inside that app won't get indexed by spotlight, if you delete that app then all notes and references are also gone.

I can't think of a sensible use case where this would be a good idea. Unless of course you are an app developer and you are wanting to store things during app execution.

I would not recommend doing this even though it should technically work.