We were using API "SMLoginItemSetEnabled" earlier to register loginItem with launchd. loginItem(helperApp) registers with launchd and on next reboot launchd service launches helperApp which in-turn launches mainApp.
Our loginItem app is bundled within mainApp LoginItem path: $mainAPP.app/Contents/Library/LoginItems/helper.app
But since it got depreciated in macOS 13 so we are planning to use new API's of "SMAppService" as suggested in this link https://developer.apple.com/documentation/servicemanagement/updating_helper_executables_from_earlier_versions_of_macos.
But on invoking the register() API of SMAppService it returns success but fails to register with launchd service.
On checking the status for our loginItem in terminal via command launchctl list it shows as 78
Also on checking launchd logs we observed errors related to our loginItem
Please suggest if any other changes are need to be done. Thanks in Advance.