Re: Multiple versions of an app


Alex Zavatone
 



On Dec 16, 2020, at 3:18 PM, Jack Brindle via groups.io <jackbrindle@...> wrote:

Now, if you really want eight individual apps, create a single parent-app that contains the individual apps, launching them as needed (NSTask will do the job quite well). 

An awesome thing to do if you want to use NSTask is to check if there are any other instances of the app running.  I use a shell script to check if the PID exists.  If there aren’t, then one app automatically launches all the rest through either NSTask or a shell script.

The same shell script that I used before or a look as mentioned can be used to build the name and launch the other apps.

open /Applications/Carl-o-matic-1.app;
open /Applications/Carl-o-matic-2.app;
open /Applications/Carl-o-matic-3.app;
open /Applications/Carl-o-matic-4.app;
open /Applications/Carl-o-matic-5.app;
open /Applications/Carl-o-matic-6.app;
open /Applications/Carl-o-matic-7.app;
open /Applications/Carl-o-matic-8.app;
 
There are lots of ways to do this, but IMHO, the apps will have known names, just do it the easy way and open them instead of writing too much code.

Ben’s idea for the build is nice and crafty.  You can have a custom build scheme to handle that pretty nicely.

Alex Zavatone

Join xcode@apple-dev.groups.io to automatically receive all group messages.