App Automatically Deleted from Applications Folder - OSX

I made an application in Script Editor and it works as expected. But the app seems to be getting automatically deleted at random times. For example, I made it a few days ago, tested it successfully, then went back today to look for it and it was gone. Tested this multiple times.

I bit more detail about my process:

  • I wrote the app in Script editor, exported it as an Application with run-only checked and no code signing
  • after manipulating a few things (.plist file, .icns file), I then remove extended attributes and code-sign using terminal. I have an Apple developer account that I use to code-sign:
xattr -cr <path_to_app>
codesign -s <my_developer_account> <path_to_app_bundle>
  • then I copy the app into my Applications folder and test it successfully
  • a day or more later, the app is gone (and I haven't even opened it again)

Ventura 13.1, Mac Book Pro 2021

Replies

Just to close the loop, after some testing, I believe the issue was with my certificate. I downloaded it again from the Apple developer site and ran through the same process and it appears to have worked.

So despite there being no flag when codesigning with a bad certificate, the app was seen to be from an untrusted developer and was deleted automatically.