Ionic cordova build android --prod --release signing.properties not used

Hi, when i do ionic cordova build android --prod --release it just creates a unsigned build. everything works fine when i do the keystore file as a parameter. in ionic cli 2.2.0 it worked fine when i have a file called release-signing.properties

that stopped working. i would love to know from where the cli fetches the properties for signing when --prod --release is handed over.

Can someone help?

Hey there,

In order to generate signed apk’s we use a build.json config file that sits in the root of the project.

The command we use to build the apk looks something like this:
ionic cordova build android --prod --release --buildConfig build.json --verbose

Our build.json file looks something like this:

{
    "ios": {
        "debug": {
            "codeSignIdentity": "iPhone Distribution",
            "provisioningProfile": "xxxxxxx-xxxxx-xxx-xxxx-xxxxx",
            "developmentTeam": "xxxxxx",
            "packageType": "ad-hoc",
            "iCloudContainerEnvironment": "Development",
            "buildFlag": [
                "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
            ]
        },
        "release": {
            "codeSignIdentity": "iPhone Distribution",
            "provisioningProfile": "xxxxxxx-xxxxx-xxx-xxxx-xxxxx",
            "developmentTeam": "xxxxxxx",
            "packageType": "app-store",
            "iCloudContainerEnvironment": "Production",
            "buildFlag": [
                "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
            ]
        }
    },
    "android": {
        "debug": {
            "keystore": "../build-config/android/xxxx.keystore",
            "storePassword": "********",
            "alias": "xxxxxx",
            "password": "********",
            "keystoreType": ""
        },
        "release": {
            "keystore": "../build-config/android/xxxxx.keystore",
            "storePassword": "********",
            "alias": "xxxxxx",
            "password": "******",
            "keystoreType": ""
        },
        "device": {
            "keystore": "../build-config/android/xxxxx.keystore",
            "storePassword": "*******",
            "alias": "xxxxxx",
            "password": "*******",
            "keystoreType": ""
        },
        "emulator": {
            "keystore": "../build-config/android/xxxx.keystore",
            "storePassword": "*******",
            "alias": "xxxxxx",
            "password": "*******",
            "keystoreType": ""
        }
    }
}

Hope this helps.

4 Likes

Thanks so much and sorry for didnt reply instantly. It works great.