For example setting the effective icon (rather than Info.plist + Resources/AppIcon.icns) doesn't affect the signature.
Ah, um, yeah it does. The
Info.plist is a critical file that has its own slot in the code directory:
Code Block % codesign -d -vvvvvv /Applications/BBEdit.app 2>&1 | grep -- "-1=" |
-1=4eea0af2cd2b202cf8bdbcfa9e1f6efb8373009fe9070588fbade7b7dddc7723 |
% shasum -a 256 /Applications/BBEdit.app/Contents/Info.plist |
4eea0af2cd2b202cf8bdbcfa9e1f6efb8373009fe9070588fbade7b7dddc7723 … |
The app’s icon is a resource and thus it’s sealed in the code signature’s resources file:
Code Block % grep "BBEditApplication.icns" -A 6 /Applications/BBEdit.app/Contents/_CodeSignature/CodeResources |
<key>Resources/BBEditApplication.icns</key> |
<data> |
VUsjiEcfRmwuleDzFTKs3HpjFa8= |
</data> |
… |
-- |
<key>Resources/BBEditApplication.icns</key> |
<dict> |
<key>hash2</key> |
<data> |
Il+N0Z6jHmxXR8X4+680aqLG33WJCXmGXVVkscYWZTs= |
</data> |
</dict> |
This is, in turn, sealed within the code directory:
Code Block % codesign -d -vvvvvv /Applications/BBEdit.app 2>&1 | grep -- "-3=" |
-3=ab269e19737411f4cb8850ae51241c410c5478cb943cf92f0b068b588e837a59 |
% shasum -a 256 /Applications/BBEdit.app/Contents/_CodeSignature/CodeResources |
ab269e19737411f4cb8850ae51241c410c5478cb943cf92f0b068b588e837a59 … |
I think you might be thinking of a custom icon, which is stored within an
Icon\r file in the root of the
.app directory. And no, I don’t recommend using that file to store user data! That would most definitely constitute
managerial abuse.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"