科尔多瓦生成ios不会创建ipa文件

时间:2018-07-27 19:26:26

标签: ios cordova build ipa

我正在为iOS构建cordova项目,构建日志看起来不错,但是我找不到生成的任何ipa文件:

$ 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看起来不错。

但是没有ips文件:

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

Xcode版本为9.4 cordova-ios@4.5.5

1 个答案:

答案 0 :(得分:3)

build命令应以npm run cordova -- build ios --release --device运行,必须使用双破折号,否则npm run不会将build ios --release --device 作为参数传递给cordova脚本。恩,我花了一段时间才找到它。