You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Threaded mode: the activation policy, before a launcher's runMain launches the app #64
initApp({ activationPolicy }) has to run before the app finishes launching, because a Regular launch registers a Dock tile.
Under a launcher, the app's code has not run by then. react-x11's react-x11/cocoa-main, for example, calls initApp() and then runMain() on the main thread before the worker has imported the app's entry.
So an app's own initApp({ activationPolicy: 'accessory' }) from the worker arrives after finishLaunching. This is inferred from the ordering; I have not observed it on screen. The expected result is an agent app that shows a Dock tile until the policy is applied.
Proposed
A way to set the policy before launch that does not need the app's code to have run. For example:
runMain({ activationPolicy }), which the launcher calls with a value it knows at startup — from an env var, or a flag of its own;
or initApp reading the policy from an environment variable.
A bundled app already gets this right from LSUIElement in its Info.plist. The shape is the bridge's choice.
Activity