What are the criteria that makeSingleInstance uses to determine the instance?


I have an electron app with different flavors - let’s say Red Foo and Blue Foo - and a package “Foo” that will be customized to a specific flavor in the build process. I’m using app.makeSingleInstance to make sure that I only have one instance of a particular flavor running, and it works great.

I noticed that this works despite me not setting the “name” in the package.json to anything specific, however I do set the userData path (using app.setPath) to something specific to the app flavor. I think this is the discerning factor but I also feel that this is somewhat of an accident that this works the way I intended.

So my question is, for the sake of reliability, what is the nature of the lock that makeSingleInstance is using to differentiate between different apps? What do I have to make unique to have apps be considered the same in terms of makeSingleInstance?

BTW the app is running on Windows and Mac.