We have a launch daemon installed to /Library/LaunchDaemons which is loaded in the installer's postinstall by "launchctl load /Library/LaunchDaemons/com.company.AppName.service.plist". Since there have bin problems with the service starting on startup on ventura, we tried to install the plist-file into the bundle to /Contents/Library/LaunchDaemons, as recommended in the article "Updating helper executables from earlier versions of macOS", for installations on ventura. The problem is, that loading it in postinstall by "lauchctl load /Applications/AppName.app/Contents/Library/LaunchDaemons/com.company.AppName.service.plist" fails with "Load failed: 125: Domain does not support specified action". launchctl seems not to be prepared to handle LaunchDaemons included in bundles. So how can I load my launch daemon in postinstall?
Post
Replies
Boosts
Views
Activity
Hi,
in the video wwdc2022-10096 at about 05:45 it is explained how to allow other software to update your software by adding team-idetifiers an signing-identifiers to an Info.plist. I would need a few more details.
Which Info.plist file do I have to change?
I use pkgbuild to build the packages and productbuild to combine them. pkgbuild --analyse --root generates an .plist-file for every single package. Do I have to add the Information there? productbuild --sythesize generates an xml-file discribing the whole thing. This would refer better to the installer as a whole, but it is not an info.plist.
How and where exactly to add the information?
I tried to use plutil, but it doesn't like array-names to start with numbers as team-identifiers often do. Also it crashes quite often. The .plist-files generated by pkgbuild either contain an empty array or several unnamed items.
[
]
Do I even need to add something threre? The other one contains several Items:
[
0 => {
"BundleIsRelocatable" => 0
"BundleIsVersionChecked" => 1
"BundleOverwriteAction" => "upgrade"
"NSUpdateSecurityPolicy" => {
"AllowProcesses" => {
"123ABC" => [
0 => "com.example.pal.about"
]
}
}
"RootRelativeBundlePath" => "Library/PreferencePanes/***.prefPane"
}
1 => {
"BundleIsRelocatable" => 0
"BundleIsVersionChecked" => 1
"BundleOverwriteAction" => "upgrade"
"NSUpdateSecurityPolicy" => {
"AllowProcesses" => {
"123ABC" => [
0 => "com.example.pal.about"
]
}
}
"RootRelativeBundlePath" => "Library/Frameworks/***.framework"
}
2 => {
"BundleHasStrictIdentifier" => 1
"BundleIsRelocatable" => 0
"BundleIsVersionChecked" => 1
"BundleOverwriteAction" => "upgrade"
"NSUpdateSecurityPolicy" => {
"AllowProcesses" => {
"123ABC" => [
0 => "com.example.pal.about"
]
}
}
"RootRelativeBundlePath" => "Applications/***.app"
}
]
Should it look like this?
A more detailed example would be great.
Thanks!