@DTS Engineer
Tried this, but then the app doesn't launch anymore:
<dict>
<key>launch-type</key>
<dict>
<key>$or</key>
<dict>
<key>$lt</key>
<integer>3</integer>
<key>$gt</key>
<integer>3</integer>
</dict>
</dict>
</dict>
Probably it's the wrong syntax because I get the following error if I launch the app:
AMFI: Launch Constraint Violation (enforcing), error info: c[4]p[1]m[2]e[6], ($or operator disallowed for active fact)
Unfortunately especially the operators are poorly documented. Any idea?
Thanks,
Marc
Post
Replies
Boosts
Views
Activity
@DTS Engineer
I played around with responsible process constraints but it seems that this was completely wrong. Thanks for your support.
BTW: Could you please explain how to set launch-type to not being 3 ? Seems that there's no not operator.
Regards,
Marc
Hi @DTS Engineer!
Thanks for your reply. I tried this and it works perfectly. But unfortunately it does not work in a sandboxed environment. Even if our app is not sandboxed at the moment, we plan to sandbox it later this year. So I would be interested in a solution that also works for a sandboxed app.
The only solution I found so far is using attributesOfItemAtPath: to get NSFileOwnerAccountName, NSFileGroupOwnerAccountName, and NSFilePosixPermissions and then check these values for the current user. Is there another way to do this from within a sandbox?
Thanks.
Hi @DTS Engineer!
If found this in the transcript of this video: https://developer.apple.com/videos/play/wwdc2023/10266
"When your app requests a connection to your XPC service, launchd spawns the XPC service and is the parent of that XPC service but your app is "responsible" for that XPC service.
If I am not mistaken, XPC service (with a lower "s") refers to an agent or daemon. Or is it just a spelling mistake and refers to a XPC Service?
Thanks again!
Marc