This error pretty much means what it says: The root of your bundle contains items that aren’t sealed over by the code signature. Consider this sequence:
% # Let's start with an empty script file.
% cat test.applescript
%
% # Compile that.
% osacompile -o test.app test.applescript
.: replacing existing signature
%
% # Look at its structure.
% find test.app
test.app
test.app/Contents
test.app/Contents/_CodeSignature
test.app/Contents/_CodeSignature/CodeResources
test.app/Contents/MacOS
test.app/Contents/MacOS/applet
test.app/Contents/Resources
test.app/Contents/Resources/applet.rsrc
test.app/Contents/Resources/Scripts
test.app/Contents/Resources/Scripts/main.scpt
test.app/Contents/Resources/applet.icns
test.app/Contents/Info.plist
test.app/Contents/PkgInfo
%
% # Siging it works.
% codesign -s - -f test.app
test.app: replacing existing signature
%
% # Now add 'junk.txt' to the app.
% touch test.app/junk.txt
%
% # And now signing it fails.
% codesign -s - -f test.app
test.app: replacing existing signature
test.app: unsealed contents present in the bundle root
I’m not sure what’s going in your in your specific situation, but I recommend that you check the root of the app bundle for rogue files.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"