【发布时间】:2020-07-02 06:58:15
【问题描述】:
我实际上是 AzureDevOps 的新手,这两天我似乎找不到在 AzureDevOps 上构建我的应用程序的解决方案。
这是我到目前为止所做的:
p12 认证上传并按照本指南Install Apple Certificate 在管道中应用
provisioning 证书上传并在管道中应用Install Apple Provisioning Certificate
现在当我尝试使用 fastlane 构建我的 iOS 应用时:
cd ios
捆绑安装
-
快车道测试版
setup_ci(force=true)
gym(scheme: 'app', workspace: './ios/workspace', verbose: true)
我正在寻找一种将 Azure DevOps 中的 p12 和配置文件证书用于我的健身房构建的方法。看了很多之后,我发现 setup_ci 自动为我做的。
这是我的 Fastlane 文件
platform :ios do
lane :beta do
setup_ci(force=true)
gym(
scheme: 'AlfaCarpeting', workspace: './ios/AlfaCarpeting', verbose: true
)
end
end
这是我的 Azure 管道 yml 文件:
# Node.js with React
# Build a Node.js project that uses React.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
pool:
vmImage: 'macOS-10.15'
variables:
- group: React Native Variables
steps:
- task: InstallAppleCertificate@2
inputs:
certSecureFile: Certificates.p12
certPwd: $(P12Password)
keychain: 'temp'
deleteCert: true
displayName: Install Apple Certificate
- task: InstallAppleProvisioningProfile@1
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: 'alfaCarpetingBeta.mobileprovision'
displayName: 'Install Apple Provisioning Profile'
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
cd ios
bundle install
fastlane ios beta
displayName: 'Build iOS'
来自 AzureDevops 的日志
[05:38:20]: $ set -o pipefail && xcodebuild -workspace ./AlfaCarpeting.xcworkspace -scheme AlfaCarpeting -destination 'generic/platform=iOS' -archivePath /Users/runner/Library/Developer/Xcode/Archives/2020-03-21/AlfaCarpeting\ 2020-03-21\ 05.38.20.xcarchive archive | tee /Users/runner/Library/Logs/gym/AlfaCarpeting-AlfaCarpeting.log | xcpretty
[05:38:22]: ▸ ❌ error: /Users/runner/runners/2.165.2/work/1/s/ios/Pods/Target Support Files/Pods-AlfaCarpeting/Pods-AlfaCarpeting.release.xcconfig: unable to open file (in target "AlfaCarpeting" in project "AlfaCarpeting") (in target 'AlfaCarpeting' from project 'AlfaCarpeting')
[05:38:22]: ▸ ❌ error: /Users/runner/runners/2.165.2/work/1/s/ios/Pods/Target Support Files/Pods-AlfaCarpeting/Pods-AlfaCarpeting.release.xcconfig: unable to open file (in target "AlfaCarpeting" in project "AlfaCarpeting") (in target 'AlfaCarpeting' from project 'AlfaCarpeting')
[05:38:22]: ▸ ❌ error: /Users/runner/runners/2.165.2/work/1/s/ios/Pods/Target Support Files/Pods-AlfaCarpeting/Pods-AlfaCarpeting.release.xcconfig: unable to open file (in target "AlfaCarpeting" in project "AlfaCarpeting") (in target 'AlfaCarpeting' from project 'AlfaCarpeting')
[05:38:22]: ▸ ❌ error: No profiles for 'com.AlfaCarpeting' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.AlfaCarpeting'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'AlfaCarpeting' from project 'AlfaCarpeting')
[05:38:22]: ▸ ** ARCHIVE FAILED **
【问题讨论】:
-
你是否按照错误提示
To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'AlfaCarpeting' from project 'AlfaCarpeting') to pass additional arguments?github.com/MicrosoftDocs/vsts-docs/issues/… -
你让它工作了吗?我自己也遇到了同样的问题
标签: react-native azure-devops react-native-ios fastlane fastlane-gym