Codesign command line binaries without .app bundle

Viewed 183

How do I codesign a bunch of command line applications, e.g. self-built SVN binaries, that are not located inside a .app structure but will be delivered as .tar.gz bundle? Right now I'm using following shell commands

EXECUTABLES=$(find . \( -perm +111 -type f -or -name '*.dylib' \))

for EXECUTABLE in $EXECUTABLES
do
    codesign --force --remove-signature $EXECUTABLE
done

for EXECUTABLE in $EXECUTABLES
do
    codesign --force --options=runtime --timestamp --sign $IDENTITY --entitlements "$ENTITLEMENTS_PLIST" -v "$EXECUTABLE"
done

but it looks like this is not sufficient. MacOS 10.15 still rejects them when downloaded from a website.

1 Answers
  • the binaries need to be built with SDK 10.9 or newer
  • the notarization needs to be done like for a .app directory structure (by creating a .dmg for uploading to Apple)
Related