gpt4 book ai didi

ios - 适用于 iOS 的 Azure Devops 管道集成

转载 作者:行者123 更新时间:2023-12-05 03:54:20 25 4
gpt4 key购买 nike

我正在尝试持续交付我的 iOS 应用程序以进行 QA 测试。为此,我首先需要生成一个 ipa 文件。不幸的是,我没有看到它在“XCode”任务中生成。我确实看到存档已成功创建,并且我确实有生成包的复选框。下面是我当前的 yml 文件。

# Xcode

# Build, test, and archive an Xcode workspace on macOS.
# Add steps that install certificates, test, sign, and distribute an app, save build artifacts, and more:
# https://learn.microsoft.com/azure/devops/pipelines/languages/xcode

trigger:
- Development

pool: 'OSX'

steps:

- task: InstallAppleCertificate@2
inputs:
certSecureFile: 'MyAppDistributionCert-20200305.320pm.p12'
certPwd: '$(MyAppiOSDistributionCert)'
keychain: 'temp'

- task: InstallAppleProvisioningProfile@1
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: 'Bot_MyApp_Debug.mobileprovision'

- task: Xcode@5
inputs:
actions: 'clean build test archive'
scheme: 'MyApp'
sdk: 'iphonesimulator'
configuration: 'Debug'
xcWorkspacePath: '**/MyApp.xcworkspace'
xcodeVersion: 'default' # Options: 8, 9, 10, default, specifyPath
packageApp: true
destinationPlatformOption: 'iOS'
destinationSimulators: 'iPhone 8 Plus'
signingOption: default
provisioningProfileName: 'Bot_MyApp_Debug.mobileprovision'
exportMethod: 'Development'
exportPath: '$(system.defaultworkingdirectory)'

- task: CopyFiles@2
inputs:
contents: '**/*.ipa'
targetFolder: '$(build.artifactStagingDirectory)'
- task: PublishBuildArtifacts@1

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()

最佳答案

感谢 Levi Lu-MSFT 的帮助。你把我引向了正确的方向。最初,问题是我的配置证书错误,并且使用的是“sdk iphonesimulator”而不是“sdk iphoneos”。然后我尝试使用两种不同的配置文件(一种用于 iphone 目标,一种用于扩展),但我遇到了问题。然后我意识到我可以只使用一个证书和一个启用应用程序组的配置文件。这连同其他小的更改使我能够导出并创建一个工件。虽然我在使用我的 ipa 通过 MS App Center 分发应用程序时仍然遇到问题,但我认为这张票可以关闭。下面是我的 yaml 文件,以防有人遇到问题:

# Xcode

# Build, test, and archive an Xcode workspace on macOS.
# Add steps that install certificates, test, sign, and distribute an app, save build artifacts, and more:
# https://learn.microsoft.com/azure/devops/pipelines/languages/xcode

# The following lists all of the Xcode options
# https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/build/xcode?view=azure-devops

trigger:
- Development

pool: 'OSX'

steps:

- task: InstallAppleCertificate@2
inputs:
certSecureFile: 'TFSDJR-Certificates.p12'
certPwd: '$(TSFMyAppPW)' #MyAppiOSDistributionCert
keychain: 'temp'


- task: InstallAppleProvisioningProfile@1
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: 'TFSMyAppDebug.mobileprovision'

- task: Xcode@5
inputs:

# Build Aurguments
actions: 'clean'
scheme: 'MyApp'
**sdk: 'iphoneos'**
configuration: 'Debug'
xcWorkspacePath: '**/MyApp.xcworkspace'
xcodeVersion: 'default' # Options: 8, 9, 10, default, specifyPath

# Package options
packageApp: true
exportOptions: specify
**exportMethod: 'development'**
exportPath: '$(system.defaultworkingdirectory)'
teamId: YOURTEAMID
exportTeamId: YOURTEAMID


- task: CopyFiles@2
inputs:
contents: '**/*.ipa'
targetFolder: '$(build.artifactStagingDirectory)'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()

关于ios - 适用于 iOS 的 Azure Devops 管道集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61089693/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com