Monday, April 19, 2021


Where to place files inside a Mac .app bundle

Placing the wrong files in the wrong location can cause code signing errors

Monday, April 19, 2021 - Sam Rowlands

Every once in a while the question comes up, or I see people having trouble code signing because files are in the wrong folders.

In almost all of these cases, the application works fine while debugging the unsigned version, but when the app is signed, problems arise.

There are were multiple Apple documents covering this from different angles, the below table is taken from the code signing guidelines, which was last updated in 2016.

Executable code should go into the most appropriate folder

Contents/MacOSMain executable, helper apps and tools
Contents/Frameworks Frameworks and dylibs
Contents/PlugInsPlug-ins, both loadable and Extensions. Not to be confused with Xojo plugins, these produce .dylib files.
Contents/XPCServicesXPC services
Contents/Helpers Helper apps and tools
Contents/Library/Automator Automator actions
Contents/Library/Spotlight Spotlight importers
Contents/Library/LoginItems Installable login items
Contents/Library/LaunchServicesPrivileged helper tools installed by the ServiceManagement framework

Everything else

Throw everything else, lproj, images, sounds and data files into...

Contents/Resources    The place for non-executable files.