daemons, agents & service deployments

I’ve been jumping around archives and forum entries but cant quite figure this out back to front. I have desktop apps that each work with a service app (console/user agent/service) and they work as expected. I wonder if anyone knows a few answers around deploying?

  • I have apple dev certs and App wrapper and DMG Canvas. On Win, I have Innosetup but not all Win certs yet.
    I think I need to code sign the apps and all the dependant libs, both desktop and services right? Ive been able to do that with the command line and the suggestions here in the docs but Im not sure how to get them deployed on unknown user setups. I had started to use AuthorizationMBS and can write a plist to an agent folder or daemon folder on mac and run shell commands to start the agent. Recently, I had a tester with a brand new calatina powerbook that the plist and User/Library/LaunchAgents wouldnt even appear after the above - until after a restart. So now Im also worried about reading that MAS wont allow such autorizations and plist writes from within an app so Im a bit stuck. how can I write/copy/install the plist into the right place and get it runing.

I need to do it on Win too. I have a service app I can easily get running via command prompt but am wondering about current best approaches to install and set it up running.

Yes you will. You can do this from macOS with ExeWrapper, a little tool I wrote. It’s like AppWrapper for Windows apps. It will know what needs to be signed or skipped, and makes signing a simple operation.

You can’t ask for elevated permissions in the Mac App Store. See the guidelines section 2.4.5 (v)

If you’re looking to make an application launch at startup; the MAS approved option is here in this forum, I just cannot recall what it’s called. But it doesn’t need to use a Launch Agent.

@Tim, thanks! I bought your ExeWrapper tool and that will save me a few headaches on the Win side.
@Sam - thanks as well. I am looking all over th eforum and elsewhere to figure out whats the best approach. Im not married to an agent but I do think I can write a plist to a user’s. Library/LaunchAgent Folder. That solves the problem except that it requires a log off/on to get it running. Thats not the end of the world but it looks and feels weird to me. Sam, do yo urememebr the gist of that route? I wouldnt mind an invisible helper app but id prefer a good ol’ fashioned daemon - especially since i dont see that code changing much over time.

Maybe this is the answer?


[quote] Creating a Login Item for Your App

To create a login item for your sandboxed app, use the SMLoginItemSetEnabled function (declared in ServiceManagement/SMLoginItem.h) as described in Adding Login Items Using the Service Management Framework.

(With App Sandbox, you cannot create a login item using functions in the LSSharedFileList.h header file. For example, you cannot use the function LSSharedFileListInsertItemURL. Nor can you manipulate the state of Launch Services, such as by using the function LSRegisterURL.)