我正在为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
答案 0 :(得分:3)
build命令应以npm run cordova -- build ios --release --device
运行,必须使用双破折号,否则npm run
不会将build ios --release --device
作为参数传递给cordova
脚本。恩,我花了一段时间才找到它。