Post

Replies

Boosts

Views

Activity

Reply to setCodeSigningRequirement seems not to work in new Service Management API setup.
I have prepared the sample, the launch daemon is packaged inside the app. The app requires launch daemon's plist and binary to be located inside the app and specified location, which is controlled by Build Settings. I tried this example and my own project with Hardened Runtime and it does not works. The original example that I took from Apple Developer's website also did not include it and hence I did not opt for it too earlier. I commented the code that calls setCodeSigningRequirement. I have also commented SwiftUI preview as it will eager load daemon during preview. Currently I am calling register service in constructor hence the issue, I do it differently in project. Debugging launch daemon at times is difficult main need being to understand why it is not starting, but launch daemon inside the app is much more challenging, if it fails to start for some reason, digging logs in console.app is hard. Just a view point. When you launch the app there is single button on click of it you should get back response from XPC provider what is its pid. The demo app is uploaded here.
Topic: Privacy & Security SubTopic: General Tags:
Mar ’25
Reply to setCodeSigningRequirement seems not to work in new Service Management API setup.
ok, no issues, I'll await your response. Aim of Installer (that I want to achieve using mechanism discussed above): Copy files packaged within app to root protected directory by launch daemon. Execute command line to install auth plugin and take backup of current setup, for rollback. (via installer launch daemon) Execute command line to install launch daemon for(paired) auth plugin (via installer launch daemon) Execute command line to store secret in system keychain (via installer launch daemon) First time app installs auth plugin and other artefacts, on next launch helps manage them. (installation + management) I mention this as you noted above I am not using Hardened Runtime, if I do app's launch daemon fail to work. If hardened runtime is not used it will not get Notarised, I am in a fix here. Also call to setCodeSigningRequirement is in question.
Topic: Privacy & Security SubTopic: General Tags:
Apr ’25
Reply to setCodeSigningRequirement seems not to work in new Service Management API setup.
I just tried the example I shared with you with Hardened Runtime enabled, it seems to be working fine. When I said XPC stops working, I meant the service fails to launch and reply, sorry I don't have error details right now. At present I cannot reproduce it with the sample I shared. I was getting it with the project I was working on. I am surprised with the result, I clearly remember calls failing, may be I did really something stupid and assumed it does not works. I'll revisit the project and check again, in case I am able to reproduce the issue, I'll start a new thread. Thanks for your efforts in helping with the setCodeSigningRequirement issue, really appreciate.
Topic: Privacy & Security SubTopic: General Tags:
Apr ’25