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.
Location | Description |
---|---|
Contents/MacOS | Main executable, helper apps and tools |
Contents/Frameworks | Frameworks and dylibs |
Contents/PlugIns | Plug-ins, both loadable and Extensions. Not to be confused with Xojo plugins, these produce .dylib files. |
Contents/XPCServices | XPC 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/LaunchServices | Privileged helper tools installed by the ServiceManagement framework |
Throw everything else, lproj, images, sounds and data files into...
Location | Description |
---|---|
Contents/Resources | The place for non-executable files. |