Thank you very much for the detailed answer. I will check on my side if it's just the registering call that is missing.
Regarding the status value, I'm apparently not the only one that is mislead because the documentation clearly states that this means there is an error:
Both inline and online documentations:
SMAppServiceNotFound An error occurred and no such service could be found
While I'm looking into this new framework, I must confess that I find the documentation to be rather:
confusing with important pieces of information being available in the inline documentation but not, AFAIK, in the online documentation. e.g the requirement for applications to be notarized to embed LaunchDaemons.
incoherent with the returned values, whether a value is actually returned or not. e.g. the registerAndReturnError: method where the inline documentation states that true and false are returned, or where both the inline and online documentation state that CoreFoundation enum values are returned by this method whereas these are just possible error codes of the NSError * out parameter.
confusing when it comes to the case where an embedded LaunchAgent or LaunchDaemon, or their corresponding PropertyList are updated. This is a part where a project example would provide some clarification. From the way it looks so far, the documentation seems to suggest that the version management of embedded agents or daemons could be worse than the embedded System Extensions' one and could make the whole thing unusable.
I'm also surprised by the method prototypes for register and unregister which, unless I'm mistaken, do not follow the Cocoa pattern and are strongly suggesting that a NSError * is being returned.
I'm surprised that there are no recommendations in the documentation regarding the POSIX permissions for the property list or embedded launch agents/daemons considering that these are usual show stoppers for the legacy agents or daemons.
I'm disappointed that there are no Cocoa error domain string or error code values and that it is required to use CoreFoundation values.
I filed a few Feedback assistant tickets about this.