我正在尝试从命令行构建一个Ionic - Cordova iOs应用程序(使用azure devops构建和部署代理),但从最近的更新(证书、xcode、操作系统等)来看,我不再成功。
在尝试了很多选项之后,我对xcode命令行有些迷惑。之前的“一些更新”,这个命令工作得很好,所以我不知道配置文件和证书发生了什么。
下面是我使用的命令行:
security unlock-keychain -p **** [keychainpath]
ionic build --prod
ionic cordova build ios --no-build --release --device --provisioningProfile="*****" -- --buildFlag="-UseModernBuildSystem=0" --developmentTeam=***** --codeSignIdentity="iPhone Developer" --packageType=app-store这就是结果(我省略了“存档成功”之前的所有日志):
** ARCHIVE SUCCEEDED **
2019-11-15 08:01:36.413 xcodebuild[32327:470732] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/jg/06xlqgms5n54qgh0mcj3tkvw0000gp/T/******_2019-11-15_08-01-36.412.xcdistributionlogs'.
error: exportArchive: No profiles for '*********' were found
Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for '*****' were found" UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription=No profiles for '******' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching '******'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}
** EXPORT FAILED **
(node:31915) UnhandledPromiseRejectionWarning: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,*******.xcarchive,-exportOptionsPlist,/Users/*****/*****/_work/1/s/platforms/ios/exportOptions.plist,-exportPath,/Users/*****/*****/_work/1/s/platforms/ios/build/device
(node:31915) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:31915) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.我试着用XCode (和同一个用户)的图形用户界面来构建应用程序,没有问题,所以我猜证书和配置文件肯定是正确的。
关于命令行发生了什么,有什么线索吗?
发布于 2019-11-15 18:47:24
我终于找到了答案:这是一个糟糕的分布配置文件和开发配置文件参数的组合。
我在cordova构建中使用--verbose模式找到了它
我更改了定义参数的方式,以使用"build.json“定义文件构建ios包:
build.json
{
"ios": {
"debug": {
"codeSignIdentity": "iPhone Developer",
"developmentTeam": "*******",
"packageType: development,
"provisioningProfile": "*******"
},
"release": {
"codeSignIdentity": "iPhone Distribution",
"developmentTeam": "******",
"packageType": "app-store",
"provisioningProfile": "*******"
}
}
}它可以与命令行一起使用,如下所示:
ionic cordova build ios --no-build --prod --release --device --buildConfig build.json多亏了这一点,我能够看到问题所在,最终a能够很好地对ipa文件进行签名。
https://stackoverflow.com/questions/58872051
复制相似问题