Post

Replies

Boosts

Views

Activity

Reply to How to authorize LaunchDaemons
I tried both the app and the daemon non-sandboxed. I am getting the error - "Unable to register Error Domain=SMAppServiceErrorDomain Code=1 "Operation not permitted" UserInfo={NSLocalizedFailureReason=Operation not permitted}" only way it works is manually adding app to Allow in the background in Login items and Extensions setting page
Aug ’24
Reply to How to authorize LaunchDaemons
I tried both ways In a sandboxed app and daemon and once without sandboxing. In both cases I did not receive request for the authorisation on calling SMAppService.register(), I am getting error - "Unable to register Error Domain=SMAppServiceErrorDomain Code=1 "Operation not permitted" UserInfo={NSLocalizedFailureReason=Operation not permitted}" meanwhile I tried calling - SMAppService.openSystemSettingsLoginItems() It opens system settings where I manually added my app in Allow in the background post that I was able to Launch daemon successfully. But for user it might be little tedious and confusing as Login items and Extensions setting page consist Login items, Allow in the background and Extentions, then user need to add app manually, quit application and launch again. Why SMAppService.register() is not popping the request for user authorisation I sandboxed both App and daemon.
Aug ’24