Reputation: 705
I have a ionic cordova app, for which I am creating a .appx file using electron-builder.As per my knowledge electron-builder takes all the configuration from build field of package.json file.While uploading the created appx on store i am getting below error:
Invalid package identity name
Invalid package family name
I am not able to understand where can I add the configuration for the above error. I have tried associating my app with windows store which did create some of the changes in manifest files, but not for all the platform manifest files. Due to internally distributed package dependency i cannot use Visual Studio to create appx. I referred to electron-builder-appx But if i add those mentioned fileds in the package.json then i get "Unknown property Error". Here is the package.json file.
package.json build field config:
{
"build": {
"extraFiles": [
"some-internal-plugin-dist"
],
"appId": "myCompany.myApp",
"nsis": {
"perMachine": true,
"oneClick": false,
"allowToChangeInstallationDirectory": true
},
"squirrelWindows": {},
"files": [
"electron.js",
"www/**/*"
],
"win": {
"certificateFile": "./certs/CordovaApp.wincert.pfx",
"icon": "win.ico",
"publisherName": "my Company",
"target": [
{
"target": "nsis",
"arch": [
"ia32"
]
}
]
},
"nodeGypRebuild": "false",
"npmRebuild": "false"
}
}
I also did refer to the question asked on the same but nothing helped.Can anyone please help me with this?
Upvotes: 2
Views: 1038
Reputation: 705
Two things i tried to make it work:
1)Added property in package.json inside build property as below:
{
"build"{
"appx": {
"identityName": "****",
"publisher": "CN=********************",
"publisherDisplayName": "********",
"applicationId": "***",
"displayName": "***"
}
}
}
Due to which while creating the build with electron-builder, it started taking these configuration.
2)Also opened the cordova project from platfrom windows in visual studio and signed in with store user and associated the app with store, which changed the appmanifest.xml file.
3)For create appx successfully used electron-builder for the same, added below property in script in package.json:
"distwithappx": "electron-builder -w appx"
After building the cordova windows build used below command to generate the appx.
npm run distwithappx
Upvotes: 2