I'm making a program that works as an agent on macOS.
The language is Objective-C.
It is created with XCode based on "app" of "macOS".
The plist is placed in /Library/LaunchAgents, and its LimitLoadToSessionType is Aqua and LoginWindow.
When I call NSApplicationMain() in main function, I expect [AppDelegate applicationDidFinishLaunching:] to be called.
However, in macOS Catalina, after calling NSApplicationMain() in the login window immediately after the OS starts,
[AppDelegate applicationDidFinishLaunching:] is not called.
It has been confirmed that if you log in once and then log off, it works as expected.
With macOS Mojave, both immediately after OS startup and when logging off after login, it worked as expected.
Why does this behavior occur immediately after the OS of macOS Catalina is started?
Also, please let me know if there is a way to avoid this behavior.
The language is Objective-C.
It is created with XCode based on "app" of "macOS".
The plist is placed in /Library/LaunchAgents, and its LimitLoadToSessionType is Aqua and LoginWindow.
When I call NSApplicationMain() in main function, I expect [AppDelegate applicationDidFinishLaunching:] to be called.
However, in macOS Catalina, after calling NSApplicationMain() in the login window immediately after the OS starts,
[AppDelegate applicationDidFinishLaunching:] is not called.
It has been confirmed that if you log in once and then log off, it works as expected.
With macOS Mojave, both immediately after OS startup and when logging off after login, it worked as expected.
Why does this behavior occur immediately after the OS of macOS Catalina is started?
Also, please let me know if there is a way to avoid this behavior.
I had cause to look at this today. This seems to a new variant of a bug (r. 5636091) that’s documented in the read me for the PreLoginAgents, except that this variant affects normal window server connections, not just the ones used by CGEventTap. If anyone else hits this, please open a DTS tech support incident so we can talk about workarounds.
I filed a new bug to track this variant of the issue (r. 65934301).
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
I filed a new bug to track this variant of the issue (r. 65934301).
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"