I have used some third party tools to create an app for MacOS platform and followed the "Manual Code Signing Example" in the Developer Forums to sign and notarize my app bundle.
Other than the app bundle and the main executive, all files are libraries. So I remove their signatures and sign them according to their dependance with specific bundle IDs.
codesign -s $developer_ID -f --timestamp -i $this_bundle_ID $file
Then sign the app bundle:
codesign -s $developer_ID -f --timestamp -o runtime --entitlements "${WORKDIR}/app.entitlements" "${APP}"
I have check through all the files are signed with
Authority=Developer ID Application: Developer ID Certification Authority
and timestamp
Timestamp=dd MMM YYY at hh:mm:ss
I pack the app into dmg by using hdiutil and sign it using my Developer_ID: Application. the codesign -dvv still report OK for the dmg.
However, once I upload the dmg for notarisation and do a check:
% xcrun notarytool history --keychain-profile "my_keychain"
it report as:
Successfully received submission history.
history
--------------------------------------------------
createdDate: 2022-09-14T08:16:16.707Z
id: My_submission_ID
name: MyApp.dmg
status: Accepted
--------------------------------------------------
createdDate: 2022-09-04T03:05:35.977Z
id: My_submission_ID
name: MyApp.dmg
status: Invalid`
Looking into the issue, I do a xcrun notarytool log My_submission_ID --keychain-profile "my_keychain"> error_log.txt
It reports all my files except for the app executable don't have certificate and timestamp.
"issues": [
{
"severity": "error",
"code": null,
"path": "MyApp.dmg/MyApp.app/Contents/MacOS/Python",
"message": "The binary is not signed with a valid Developer ID certificate.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "MyApp.dmg/MyApp.app/Contents/MacOS/Python",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64"
},
I would very much appreciate it if someone could show me some pointers.
Thank you in advance.