Is there a tutorial, code , something where you can find anything related to Helper apps and how you can run them and where ?
The idea is either to bundle the helper app and then install it in the proper location and have it run on login / boot or to have it downloaded separately and then activate it so that it can run automatically on login or on boot.
So far what I found are old threads that are not anymore updated and apparently locked so that forces me to create a new topic.
OS Focus, I guess the last 3 available which means Catalina, BigSur and Mojave and soon Monterey.
App will not go trough apple store so is installed locally by us, so no sandboxing required.
Thanks in advance.
Search for Workers maybe…The Xojo’s relative new concept of workers are basically Helper apps.
No, Workers aren’t Loginitems. You need to make a full second app and put it in this directory:
Then you need to create a LaunchAgent. You can write one manually or you can let the app Lingon help you.
Well the idea was that the helper starts on login or boot and does some monitoring for the app for certain parts to run, so in my case using Workers would not help as it will run when and if app is started.
Thank Beatrix, that is what I was looking for exactly, now the funny part, is there a way that the Helper app can be made to run without showing to the Dock ? I did that long time ago but my helper app was a apple Script build as App. and basically that once added to the login was running all the time in the background monitoring things without showing anywhere in the dock, that was the original approach and I wanted to have it same way here.
As for the launch agent I assume that this would be a file that you would have to put in ~/Library/LaunchAgents and enable it and I guess restarting the Mac would load the startup app
Use a script to make the app invisible:
'set scheduler to be a background app
dim dbg as String
if debugBuild then dbg = ".debug"
dim appNameForShell as string
appNameForShell = PropertyValue("App.MacOSXAppName") + dbg +".app" + "/Contents/Info.plist"
appNameForShell = replaceall(appNameForShell, " ", "\ ")
dim theResult as string
theResult = DoShellCommand("/usr/libexec/PlistBuddy -c ""Add :NSUIElement string \""true\"""" " + CurrentBuildLocation + "/" + appNameForShell )
if theResult <> "" then print theResult
Yes, you have to create the file into ~/Library/LaunchAgents. I write the file directly and when that fails with authorisation. The result is that the app is started when you restart the Mac. You can even set the app to autostart on crash.
Oh, that’s cool, thanks a lot I assume that this would be a build script and once this is applied all should work properly ?
Yes, this is a build script. And I use an IDE Communicator script to build my Russian doll: helper, uninstaller, main app and installer.
i guess this is the best time, how do you handle the signing ? is there a specific process ? luckily the app i need to sign and add the helper is build in 2019R3.2 and the helper in the latest XOJO version, i see in the latest is handled automatically so i assume that you need to exclude the helper from signing process not to override the helper.
I sign every app. My goal was to have AppWrapper do the codesign but AppWrapper is overwriting something it shouldn’t with the plist files for the permissions. So I reverted back to my old codesign script.