How to detect whether an OS X application is already launched

前端 未结 9 1606
自闭症患者
自闭症患者 2020-12-14 02:46

Normally an application bundle on OS X can only be started once, however by simply copying the bundle the same application can be launched twice. What\'s the best strategy t

9条回答
  •  情深已故
    2020-12-14 03:03

    What about IPC? You could open a socket and negotiate with the other launched instance. You'd have to be careful though, that it works if both apps start at the same time.

    I can't provide you with sample code, as I haven't (yet, but I will soon) used it.

提交回复
热议问题