We have a test scenario where we install our app package on a Mac setup using MDM (Jamf). Below are the test steps and observation:
- This installation is done on this Mac with no user logged in.
- Installation is completed successfully.
- Now when an user log in on this mac machine, the expectation is that the app bundle will be started by the launchd (RunAtLoad). But the app is not started. When I check console logs I could see few logs around the app but from those logs I couldn't figure out why the app didn't start.
- I rebooted my test machine but that also didnt start my app. My app is not listed in 'launchctl list' command.
- My App bundle contains container app and a packet tunnel extension.
- Below is how my plist file looks like in '/Library/LaunchAgents/com.****.***ui.plist':
{
KeepAlive = 1;
Label = "com.*****.client.****ui";
LimitLoadToSessionType = (
Aqua
);
ProgramArguments = (
"/Applications/*********.app/Contents/MacOS/****Module"
);
RunAtLoad = 1;
SuccessfulExit = 1;
Version = "110.200.0.100";
}
- In Console below are the last set of log which I could find related to my app:
In above logs below statement mentions the extn which is related to my app bundle:
2024-03-19 15:48:55.256020+0530 0x462 Default 0x0 206 0 symptomsd: (SymptomEvaluator) [com.apple.symptomsd:analytics] [Skipping first 85 of 95 entries]
2024-03-19 15:48:55.256051+0530 0x462 Default 0x0 206 0 symptomsd: (SymptomEvaluator) [com.apple.symptomsd:analytics] entry: Thu Feb 8 20:48:26 2024 NetworkExtension.com.*****.client.*****-Client.*****ui.*****pkttunnel.104.2.12.191.104.2.12 (bundle) 0 0 0 0 0 0
Can someone please help me in understanding what could be wrong here, why would 'RunAtLoad' key word wont work here to start my app on user login or reboot?
Note: Everything work fine when my app is installed with an user logged in to the test machine. Also App starts successfully if I run command 'lauchctl bootstrap gui/<userid> /Library/LaunchAgents/com.****.****ui.plist' in the above mentioned test scenario where app didnt auto start by launchd: 'RunAtLoad'.