It might need to be notorized by Apple. Create an app password, zip-up the app using
ditto -ck --rsrc --sequesterRsrc --keepParent /path/to/YourApp.app YourApp.zip
and then try xcrun notarytool submit --apple-id "your-apple-id@whatever.com" --password <app-password> --team-id <dev-team-id> --wait YourApp.zip
(where <app-password>
is your app password, and <dev-team-id>
is your 10-digit team ID).