Adding my app to login items stopped working recently (using currently SMLoginItemSetEnabled method). While debugging I noticed that it returns an error "Could not enable login item: com.app.autoLauncher: 1: Operation not permitted". Tried the newest API SMAppService and it's the same like on the screenshot below. What does it mean? How can I fix it? I'm on Ventura but one of my colleagues is on Big Sur.
SMLoginItemSetEnabled returns operation not permitted
What's the numerical error code?