Get zsh killed after notarize my command-line tool

For some reason, I have to develop a command-line tool for my company and pushlish it in my company. So, After my development, I try to notatize it. And after notatization, it can not wok. My step is as follow:

  1. complie it as [tool].

  2. run commands as follows :

codesign -fs [fs] --timestamp --force --deep --options runtime --entitlements [plist_path] [tool]
codesign -dvvv [tool]
productbuild --identifier [bundleId] --sign [cert] --timestamp --install-location --root [tool_folder] / [tool_folder_pkg]
xcrun altool --notarize-app --primary-bundle-id [bundleId] --username esc@tencent.com --password [password] --file [tool_folder_pak]
xcrun altool --notarization-info [notatizaion_id] --username esc@tencent.com --password [password]
xcrun stapler staple [tool_folder_pkg]
  1. try to unzip the pkg
pkgutil --expand [tool_folder_pkg] [folder]
cd [tool_folder_pkg]
tar xvf Payload
.[tool]
  1. get error:
zsh: killed   [tool]

how can I fix it? Thanks a lot

This is almost certainly a trusted execution problem. The trust execution system is killing your process when its start running your tool because the tool is malformed in some way. See Resolving Trusted Execution Problems for advice on how to investigate this.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Get zsh killed after notarize my command-line tool
 
 
Q