I have the same question. I have all the code for zipping and notarizing, but it fails because the post build script runs before the signing, even if I drag the order to the end in the Build Phases.
Edit: found a solution here:
https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow?language=objc
You need to do your post build script on archive. This allows it to sign before running your script to notarize.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: