Search code examples
ioscordovabuildipa

cordova build ios does not create ipa file


I am building cordova project for iOS, build log seems fine however I can't find any ipa file generated:

$ npm run cordova platform add ios
$ cat Build.json
{
    "ios": {
        "debug": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "**************",
            "packageType": "development",
            "automaticProvisioning": true,
            "buildFlag": [
                "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
                "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO"
            ]
        },
        "release": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "****************",
            "packageType": "app-store",
            "automaticProvisioning": true,
            "buildFlag": [
                "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
                "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO"
            ]
        }
    }
}

$ npm run cordova build ios --release --device

Build log looks fine.

However there is no ips files:

$ find . type f -name "*.ipa" | wc -l
0

Xcode version is 9.4 [email protected]


Solution

  • The build command should be run as npm run cordova -- build ios --release --device , double dashes are essential or else npm run does not pass build ios --release --device as arguments to cordova scripts. Uph, it's taken awhile for me to find it out.