Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac application bundle able to launch multiple instances

Tags:

macos

bundle

Question: How to create a Mac application able to open multiple instances by default?

In general, a Mac application bundle maintains a single instance of a Mac program. That is, if I double click on "VLC" it will open the VLC program. If I then double click a second time, it will bring the previous VLC window to the foreground; it will not open a new instance of VLC. But if I run 'open -n' on VLC, it will force VLC to open a second instance.

I am creating a Mac application bundle and would like for a user's second double click to cause a second instance of the application to be launched. I couldn't find any relevant keys for use in Info.plist. Any ideas?

like image 434
ChaimKut Avatar asked Jul 17 '26 19:07

ChaimKut


1 Answers

Bundle the open -n command inside of a shell script in your application bundle, and let it start your main application.

like image 57
Oliver Matuschin Avatar answered Jul 20 '26 20:07

Oliver Matuschin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!