You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Electron-Builder's process of generating build numbers by taking the version number and tacking on the BUILD_NUMBER environmental variable, if you set one, is automatically rejected by the Mac App Store (MAS). It throws an error saying:
So build number 1.0.1 would be okay. Build number 1.0.0.1 is rejected.
Background: When you upload a new app pkg file to the MAS it contains a version set in the package.json file (e.g., "version": "1.0.0") and build number, which Electron Builder sets to the version number by default (e.g., also 1.0.0). Once you upload a pkg file to the MAS (but before submitting it for review) you can't delete it and you can't overwrite it. But if you want to change it before submitting for review, you can upload a new pkg file with the same version number but a different build number (e.g., version 1.0.0, and build number 1.0.1).
Per Electon-Builder's docs (https://www.electron.build/configuration/configuration), the way to add a build number is to add a file called electron-builder.env to the project's root directory. Then add a BUILD_NUMBER environmental variable (e.g., BUILD_NUMBER=1).
Then when you build the app, Electron builder will tack that on to the version number, resulting in a build number of 1.0.0.1, which will be rejected by the MAS.
The line of code where this happens is in file app-builder-lib/out/appInfo.js:
You can't simply use a two number version to get around this (e.g., "version": "1.0") as three numbers for the version is now a requirement by the MAS (1.0 will get rejected... 1.0.0 is ok).
Possible solution: if BUILD_NUMBER environmental variable is set, then make that the build version, without tacking it onto the version number (e.g., BUILD_NUMBER=1.0.1). Do that by changing the above code in app-builder-lib/out/appInfo.js to:
Electron-Builder's process of generating build numbers by taking the version number and tacking on the BUILD_NUMBER environmental variable, if you set one, is automatically rejected by the Mac App Store (MAS). It throws an error saying:
So build number 1.0.1 would be okay. Build number 1.0.0.1 is rejected.
Background: When you upload a new app pkg file to the MAS it contains a version set in the package.json file (e.g., "version": "1.0.0") and build number, which Electron Builder sets to the version number by default (e.g., also 1.0.0). Once you upload a pkg file to the MAS (but before submitting it for review) you can't delete it and you can't overwrite it. But if you want to change it before submitting for review, you can upload a new pkg file with the same version number but a different build number (e.g., version 1.0.0, and build number 1.0.1).
Per Electon-Builder's docs (https://www.electron.build/configuration/configuration), the way to add a build number is to add a file called electron-builder.env to the project's root directory. Then add a BUILD_NUMBER environmental variable (e.g., BUILD_NUMBER=1).
Then when you build the app, Electron builder will tack that on to the version number, resulting in a build number of 1.0.0.1, which will be rejected by the MAS.
The line of code where this happens is in file app-builder-lib/out/appInfo.js:
You can't simply use a two number version to get around this (e.g., "version": "1.0") as three numbers for the version is now a requirement by the MAS (1.0 will get rejected... 1.0.0 is ok).
Possible solution: if BUILD_NUMBER environmental variable is set, then make that the build version, without tacking it onto the version number (e.g., BUILD_NUMBER=1.0.1). Do that by changing the above code in app-builder-lib/out/appInfo.js to:
The text was updated successfully, but these errors were encountered: