MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/macosprogramming/comments/1e7kdki/run_in_background/le24fb8/?context=3
r/macosprogramming • u/dejii • Jul 20 '24
9 comments sorted by
View all comments
Show parent comment
1
Is there a way to have an app with windows, dock icon and statusbar that also runs in the background?
1 u/thegameoflovexu Jul 20 '24 Yeah that’s what I was trying to say. If all the UI elements are closed the app remains running, which is what I believe they mean with „Run in background“. The background app is free to open back any UI at a later point. 1 u/dejii Jul 20 '24 Do you do this with agents and daemons like someone else suggested? 1 u/cutecoder Aug 14 '24 A menu bar item is more common. 1 u/retsotrembla Jul 20 '24 Yes - macOS is a full unix. a .app can use fork() and exec() or start a command-line helper app that lives in your app bundle, and writes to a shared directory that only your full app-with-a-user-interface can access: https://developer.apple.com/documentation/foundation/filemanager/1412643-containerurl/
Yeah that’s what I was trying to say. If all the UI elements are closed the app remains running, which is what I believe they mean with „Run in background“. The background app is free to open back any UI at a later point.
1 u/dejii Jul 20 '24 Do you do this with agents and daemons like someone else suggested? 1 u/cutecoder Aug 14 '24 A menu bar item is more common.
Do you do this with agents and daemons like someone else suggested?
1 u/cutecoder Aug 14 '24 A menu bar item is more common.
A menu bar item is more common.
Yes - macOS is a full unix. a .app can use fork() and exec() or start a command-line helper app that lives in your app bundle, and writes to a shared directory that only your full app-with-a-user-interface can access: https://developer.apple.com/documentation/foundation/filemanager/1412643-containerurl/
View all comments
Show parent comment
1
u/dejii Jul 20 '24
Is there a way to have an app with windows, dock icon and statusbar that also runs in the background?