Is there a way to have an is-MAS
for Mac Store builds in Electron? I tried looking through the package.json or even a build flag but no luck as of yet. I want to be able to have conditional content that's based on where the user downloads an electron app (Mac Store, Website, etc.).
Thanks in Advance
You can use the process.mas property at run time to test whether an app has been specifically built for the Mac App Store:
process.mas
ReadonlyA
Boolean
. For Mac App Store build, this property istrue
, for other builds it isundefined
.
So, a simple isMAS
function could be defined as:
function isMAS()
{
return process.mas || false;
}