【问题标题】:React Native, AzureDevops and Fastlane ipa build failingReact Native、AzureDevops 和 Fastlane ipa 构建失败
【发布时间】:2020-07-02 06:58:15
【问题描述】:

我实际上是 AzureDevOps 的新手,这两天我似乎找不到在 AzureDevOps 上构建我的应用程序的解决方案。

这是我到目前为止所做的:

p12 认证上传并按照本指南Install Apple Certificate 在管道中应用

provisioning 证书上传并在管道中应用Install Apple Provisioning Certificate

现在当我尝试使用 fastlane 构建我的 iOS 应用时:

  1. cd ios

  2. 捆绑安装

  3. 快车道测试版

    • 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


【解决方案1】:

如果您在 xcode 中打开项目并转到 Build Settings -> Signing 您需要将“代码签名样式”调整为 Manual强>。这是我最终得到的设置(注意 - 我正在使用 fastlane match 进行证书和配置文件管理):

【讨论】:

    猜你喜欢
    • 2018-01-07
    • 1970-01-01
    • 1970-01-01
    • 2021-09-16
    • 2018-03-08
    • 2019-03-21
    • 2019-06-06
    • 2015-05-31
    • 2019-08-16
    相关资源
    最近更新 更多