我正在编写一个持续的集成/交付构建阶段,每当构建排队时,Ionic / Cordova应用程序就会从TFS中托管的源存储库构建,并将其apk / ipa文件推送到Google和Apple&#39 ; s商店。
对于iOS,我在配置与我的配置文件相关的build.json
时遇到问题。根据Cordova的指南(link),我正在配置我的build.json文件,使其codeSignIdentity
值设置为iPhone Developer
,用于调试和释放模式。但是,我不知道如果xcode需要签署分发模式才能上传到商店,这是如何工作的。每当我将codeSignIdentity
值设置为iPhone Distribution
时,我都会收到以下错误:
MyApp has conflicting provisioning settings. MyApp is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor.
如果我将两个签名身份设置为开发人员,则归档导出成功, 但随后iTunesConnect上传FastLane任务(link)失败并显示错误:
"Invalid Provisioning Profile. The provisioning profile included in the bundle com.xxx.yyy [Payload/MyApp.app] is invalid. [Missing code-signing certificate]. A Distribution Provisioning profile should be used when submitting apps to the App Store. For more information, visit the iOS Developer Portal."
如果我将两个签名身份都保留为开发人员并指定以前导入的分发配置文件,我会在xcodebuild过程中收到错误,如下所示:
error: exportArchive: No profiles for 'com.xxx.yyy' were found
build.json文件:
{
"ios": {
"debug": {
"codeSignIdentity": "iPhone Developer",
"developmentTeam": "XXXXYYYYZZZZ",
"buildFlag": [
"-allowProvisioningUpdates",
"EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
"ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
"LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
]
},
"release": {
"codeSignIdentity": "iPhone Developer",
"packageType": "app-store",
"developmentTeam": "XXXXYYYYZZZZ",
"buildFlag": [
"-allowProvisioningUpdates",
"EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
"ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
"LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
]
}
}
}