Application damaged or incomplete when logged in as second user
When installing an app from a self created DMG file, we need tu run xattr -cr after the app is copied to the applications folder to get it to work. If we don't run xattr -cr, the app says it is damaged and needs to be removed. Running xarrt solves the issue for us, except when there is a second user on the same Mac (OS Sonoma). When the second user tries to open the app (even when closed in the first user's session), this error is displayed: "You can't open the application because it may be damaged or incomplete".
Running xattr, settings permissions, ... does not solve this issue. THe only thing that solves this, is taking ownership of the app with the second user, however, the fist user cannot use the app anymore.
Any ideas anyone?
MacBook Pro (M3, 2023)