Xcode@5 - Xcode v5 工作

使用此工作在 macOS 上建置、測試或封存 Xcode 工作區,並選擇性地封裝應用程式。

Syntax

# Xcode v5
# Build, test, or archive an Xcode workspace on macOS. Optionally package an app.
- task: Xcode@5
  inputs:
    actions: 'build' # string. Required. Actions. Default: build.
    #configuration: '$(Configuration)' # string. Configuration. Default: $(Configuration).
    #sdk: '$(SDK)' # string. SDK. Default: $(SDK).
    #xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace' # string. Workspace or project path. Default: **/*.xcodeproj/project.xcworkspace.
    #scheme: # string. Scheme. 
    #xcodeVersion: 'default' # '8' | '9' | '10' | '11' | '12' | '13' | 'default' | 'specifyPath'. Xcode version. Default: default.
    #xcodeDeveloperDir: # string. Optional. Use when xcodeVersion == specifyPath. Xcode developer path. 
  # Package options
    #packageApp: false # boolean. Create app package. Default: false.
    #archivePath: # string. Optional. Use when packageApp == true. Archive path. 
    #exportPath: 'output/$(SDK)/$(Configuration)' # string. Optional. Use when packageApp == true. Export path. Default: output/$(SDK)/$(Configuration).
    #exportOptions: 'auto' # 'auto' | 'plist' | 'specify'. Optional. Use when packageApp == true. Export options. Default: auto.
    #exportMethod: 'development' # string. Required when exportOptions == specify. Export method. Default: development.
    #exportTeamId: # string. Optional. Use when exportOptions == specify. Team ID. 
    #exportOptionsPlist: # string. Required when exportOptions == plist. Export options plist. 
    #exportArgs: # string. Optional. Use when packageApp == true. Export arguments. 
  # Signing & provisioning
    #signingOption: 'nosign' # 'nosign' | 'default' | 'manual' | 'auto'. Signing style. Default: nosign.
    #signingIdentity: # string. Optional. Use when signingOption = manual. Signing identity. 
    #provisioningProfileUuid: # string. Optional. Use when signingOption = manual. Provisioning profile UUID. 
    #provisioningProfileName: # string. Optional. Use when signingOption = manual. Provisioning profile name. 
    #teamId: # string. Optional. Use when signingOption = auto. Team ID. 
  # Devices & simulators
    #destinationPlatformOption: 'default' # 'default' | 'iOS' | 'tvOS' | 'macOS' | 'custom'. Destination platform. Default: default.
    #destinationPlatform: # string. Optional. Use when destinationPlatformOption == custom. Custom destination platform. 
    #destinationTypeOption: 'simulators' # 'simulators' | 'devices'. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS. Destination type. Default: simulators.
    #destinationSimulators: # string. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == simulators. Simulator. 
    #destinationDevices: # string. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == devices. Device. 
  # Advanced
    #args: # string. Arguments. 
    #workingDirectory: # string. Alias: cwd. Working directory. 
    #useXcpretty: true # boolean. Use xcpretty. Default: true.
    #xcprettyArgs: # string. Optional. Use when useXcpretty == true. Xcpretty arguments. 
    #publishJUnitResults: false # boolean. Publish test results to Azure Pipelines. Default: false.
    #testRunTitle: # string. Optional. Use when publishJUnitResults == true. Test run title.
# Xcode v5
# Build, test, or archive an Xcode workspace on macOS. Optionally package an app.
- task: Xcode@5
  inputs:
    actions: 'build' # string. Required. Actions. Default: build.
    #configuration: '$(Configuration)' # string. Configuration. Default: $(Configuration).
    #sdk: '$(SDK)' # string. SDK. Default: $(SDK).
    #xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace' # string. Workspace or project path. Default: **/*.xcodeproj/project.xcworkspace.
    #scheme: # string. Scheme. 
    #xcodeVersion: 'default' # '8' | '9' | '10' | '11' | 'default' | 'specifyPath'. Xcode version. Default: default.
    #xcodeDeveloperDir: # string. Optional. Use when xcodeVersion == specifyPath. Xcode developer path. 
  # Package options
    #packageApp: false # boolean. Create app package. Default: false.
    #archivePath: # string. Optional. Use when packageApp == true. Archive path. 
    #exportPath: 'output/$(SDK)/$(Configuration)' # string. Optional. Use when packageApp == true. Export path. Default: output/$(SDK)/$(Configuration).
    #exportOptions: 'auto' # 'auto' | 'plist' | 'specify'. Optional. Use when packageApp == true. Export options. Default: auto.
    #exportMethod: 'development' # string. Required when exportOptions == specify. Export method. Default: development.
    #exportTeamId: # string. Optional. Use when exportOptions == specify. Team ID. 
    #exportOptionsPlist: # string. Required when exportOptions == plist. Export options plist. 
    #exportArgs: # string. Optional. Use when packageApp == true. Export arguments. 
  # Signing & provisioning
    #signingOption: 'nosign' # 'nosign' | 'default' | 'manual' | 'auto'. Signing style. Default: nosign.
    #signingIdentity: # string. Optional. Use when signingOption = manual. Signing identity. 
    #provisioningProfileUuid: # string. Optional. Use when signingOption = manual. Provisioning profile UUID. 
    #provisioningProfileName: # string. Optional. Use when signingOption = manual. Provisioning profile name. 
    #teamId: # string. Optional. Use when signingOption = auto. Team ID. 
  # Devices & simulators
    #destinationPlatformOption: 'default' # 'default' | 'iOS' | 'tvOS' | 'macOS' | 'custom'. Destination platform. Default: default.
    #destinationPlatform: # string. Optional. Use when destinationPlatformOption == custom. Custom destination platform. 
    #destinationTypeOption: 'simulators' # 'simulators' | 'devices'. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS. Destination type. Default: simulators.
    #destinationSimulators: # string. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == simulators. Simulator. 
    #destinationDevices: # string. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == devices. Device. 
  # Advanced
    #args: # string. Arguments. 
    #workingDirectory: # string. Alias: cwd. Working directory. 
    #useXcpretty: true # boolean. Use xcpretty. Default: true.
    #xcprettyArgs: # string. Optional. Use when useXcpretty == true. Xcpretty arguments. 
    #publishJUnitResults: false # boolean. Publish test results to Azure Pipelines. Default: false.
    #testRunTitle: # string. Optional. Use when publishJUnitResults == true. Test run title.
# Xcode v5
# Build, test, or archive an Xcode workspace on macOS. Optionally package an app.
- task: Xcode@5
  inputs:
    actions: 'build' # string. Required. Actions. Default: build.
    #configuration: '$(Configuration)' # string. Configuration. Default: $(Configuration).
    #sdk: '$(SDK)' # string. SDK. Default: $(SDK).
    #xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace' # string. Workspace or project path. Default: **/*.xcodeproj/project.xcworkspace.
    #scheme: # string. Scheme. 
    #xcodeVersion: 'default' # '8' | '9' | '10' | '11' | 'default' | 'specifyPath'. Xcode version. Default: default.
    #xcodeDeveloperDir: # string. Optional. Use when xcodeVersion == specifyPath. Xcode developer path. 
  # Package options
    #packageApp: false # boolean. Create app package. Default: false.
    #archivePath: # string. Optional. Use when packageApp == true. Archive path. 
    #exportPath: 'output/$(SDK)/$(Configuration)' # string. Optional. Use when packageApp == true. Export path. Default: output/$(SDK)/$(Configuration).
    #exportOptions: 'auto' # 'auto' | 'plist' | 'specify'. Optional. Use when packageApp == true. Export options. Default: auto.
    #exportMethod: 'development' # string. Required when exportOptions == specify. Export method. Default: development.
    #exportTeamId: # string. Optional. Use when exportOptions == specify. Team ID. 
    #exportOptionsPlist: # string. Required when exportOptions == plist. Export options plist. 
    #exportArgs: # string. Optional. Use when packageApp == true. Export arguments. 
  # Signing & provisioning
    #signingOption: 'nosign' # 'nosign' | 'default' | 'manual' | 'auto'. Signing style. Default: nosign.
    #signingIdentity: # string. Optional. Use when signingOption = manual. Signing identity. 
    #provisioningProfileUuid: # string. Optional. Use when signingOption = manual. Provisioning profile UUID. 
    #provisioningProfileName: # string. Optional. Use when signingOption = manual. Provisioning profile name. 
    #teamId: # string. Optional. Use when signingOption = auto. Team ID. 
  # Devices & simulators
    #destinationPlatformOption: 'default' # 'default' | 'iOS' | 'tvOS' | 'macOS' | 'custom'. Destination platform. Default: default.
    #destinationPlatform: # string. Optional. Use when destinationPlatformOption == custom. Custom destination platform. 
    #destinationTypeOption: 'simulators' # 'simulators' | 'devices'. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS. Destination type. Default: simulators.
    #destinationSimulators: 'iPhone 7' # string. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == simulators. Simulator. Default: iPhone 7.
    #destinationDevices: # string. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == devices. Device. 
  # Advanced
    #args: # string. Arguments. 
    #workingDirectory: # string. Alias: cwd. Working directory. 
    #useXcpretty: true # boolean. Use xcpretty. Default: true.
    #publishJUnitResults: false # boolean. Publish test results to Azure Pipelines. Default: false.
# Xcode v5
# Build, test, or archive an Xcode workspace on macOS. Optionally package an app.
- task: Xcode@5
  inputs:
    actions: 'build' # string. Required. Actions. Default: build.
    #configuration: '$(Configuration)' # string. Configuration. Default: $(Configuration).
    #sdk: '$(SDK)' # string. SDK. Default: $(SDK).
    #xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace' # string. Workspace or project path. Default: **/*.xcodeproj/project.xcworkspace.
    #scheme: # string. Scheme. 
    #xcodeVersion: 'default' # '8' | '9' | '10' | 'default' | 'specifyPath'. Xcode version. Default: default.
    #xcodeDeveloperDir: # string. Optional. Use when xcodeVersion == specifyPath. Xcode developer path. 
  # Package options
    #packageApp: false # boolean. Create app package. Default: false.
    #archivePath: # string. Optional. Use when packageApp == true. Archive path. 
    #exportPath: 'output/$(SDK)/$(Configuration)' # string. Optional. Use when packageApp == true. Export path. Default: output/$(SDK)/$(Configuration).
    #exportOptions: 'auto' # 'auto' | 'plist' | 'specify'. Optional. Use when packageApp == true. Export options. Default: auto.
    #exportMethod: 'development' # string. Required when exportOptions == specify. Export method. Default: development.
    #exportTeamId: # string. Optional. Use when exportOptions == specify. Team ID. 
    #exportOptionsPlist: # string. Required when exportOptions == plist. Export options plist. 
    #exportArgs: # string. Optional. Use when packageApp == true. Export arguments. 
  # Signing & provisioning
    #signingOption: 'nosign' # 'nosign' | 'default' | 'manual' | 'auto'. Signing style. Default: nosign.
    #signingIdentity: # string. Optional. Use when signingOption = manual. Signing identity. 
    #provisioningProfileUuid: # string. Optional. Use when signingOption = manual. Provisioning profile UUID. 
    #provisioningProfileName: # string. Optional. Use when signingOption = manual. Provisioning profile name. 
    #teamId: # string. Optional. Use when signingOption = auto. Team ID. 
  # Devices & simulators
    #destinationPlatformOption: 'default' # 'default' | 'iOS' | 'tvOS' | 'macOS' | 'custom'. Destination platform. Default: default.
    #destinationPlatform: # string. Optional. Use when destinationPlatformOption == custom. Custom destination platform. 
    #destinationTypeOption: 'simulators' # 'simulators' | 'devices'. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS. Destination type. Default: simulators.
    #destinationSimulators: 'iPhone 7' # string. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == simulators. Simulator. Default: iPhone 7.
    #destinationDevices: # string. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == devices. Device. 
  # Advanced
    #args: # string. Arguments. 
    #workingDirectory: # string. Alias: cwd. Working directory. 
    #useXcpretty: true # boolean. Use xcpretty. Default: true.
    #publishJUnitResults: false # boolean. Publish test results to Azure Pipelines. Default: false.
# Xcode v5
# Build, test, or archive an Xcode workspace on macOS. Optionally package an app.
- task: Xcode@5
  inputs:
    actions: 'build' # string. Required. Actions. Default: build.
    #configuration: '$(Configuration)' # string. Configuration. Default: $(Configuration).
    #sdk: '$(SDK)' # string. SDK. Default: $(SDK).
    #xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace' # string. Workspace or project path. Default: **/*.xcodeproj/project.xcworkspace.
    #scheme: # string. Scheme. 
    #xcodeVersion: 'default' # '8' | '9' | '10' | 'default' | 'specifyPath'. Xcode version. Default: default.
    #xcodeDeveloperDir: # string. Optional. Use when xcodeVersion == specifyPath. Xcode developer path. 
  # Package options
    #packageApp: false # boolean. Create app package. Default: false.
    #archivePath: # string. Optional. Use when packageApp == true. Archive path. 
    #exportPath: 'output/$(SDK)/$(Configuration)' # string. Optional. Use when packageApp == true. Export path. Default: output/$(SDK)/$(Configuration).
    #exportOptions: 'auto' # 'auto' | 'plist' | 'specify'. Optional. Use when packageApp == true. Export options. Default: auto.
    #exportMethod: 'development' # string. Required when exportOptions == specify. Export method. Default: development.
    #exportTeamId: # string. Optional. Use when exportOptions == specify. Team ID. 
    #exportOptionsPlist: # string. Required when exportOptions == plist. Export options plist. 
    #exportArgs: # string. Optional. Use when packageApp == true. Export arguments. 
  # Signing & provisioning
    #signingOption: 'nosign' # 'nosign' | 'default' | 'manual' | 'auto'. Signing style. Default: nosign.
    #signingIdentity: # string. Optional. Use when signingOption = manual. Signing identity. 
    #provisioningProfileUuid: # string. Optional. Use when signingOption = manual. Provisioning profile UUID. 
    #provisioningProfileName: # string. Optional. Use when signingOption = manual. Provisioning profile name. 
    #teamId: # string. Optional. Use when signingOption = auto. Team ID. 
  # Devices & simulators
    #destinationPlatformOption: 'default' # 'default' | 'iOS' | 'tvOS' | 'macOS' | 'custom'. Destination platform. Default: default.
    #destinationPlatform: # string. Optional. Use when destinationPlatformOption == custom. Custom destination platform. 
    #destinationTypeOption: 'simulators' # 'simulators' | 'devices'. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS. Destination type. Default: simulators.
    #destinationSimulators: 'iPhone 7' # string. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == simulators. Simulator. Default: iPhone 7.
    #destinationDevices: # string. Optional. Use when destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == devices. Device. 
  # Advanced
    #args: # string. Arguments. 
    #workingDirectory: # string. Alias: cwd. Working directory. 
    #useXcpretty: true # boolean. Use xcpretty. Default: true.
    #publishJUnitResults: false # boolean. Publish test results to Azure Pipelines/TFS. Default: false.

輸入

actions - 行動
string. 必要。 預設值:build

指定以空格分隔的動作清單。 某些有效的選項包括 buildcleantestanalyze 、 和 archive 。 例如, clean build 執行全新組建。 請參閱 Apple:使用 Xcode 常見問題從命令列建置


configuration - 配置
string. 預設值:$(Configuration)

指定要建置的 Xcode 專案或工作區組態。 使用變數時, (指定值,例如, Release 在 [ 變數 ] 索引標籤上) 。


sdk - Sdk
string. 預設值:$(SDK)

指定建置 Xcode 專案或工作區時要使用的 SDK。 從 macOS 終端機應用程式執行 以顯示 xcodebuild -showsdks 有效的 SDK 清單。 使用變數時, (指定值,例如, iphonesimulator 在 [ 變數 ] 索引標籤上) 。


xcWorkspacePath - 工作區或專案路徑
string. 預設值:**/*.xcodeproj/project.xcworkspace

選擇性。 指定從存放庫根目錄到 Xcode 工作區或專案的相對路徑。 例如,MyApp/MyApp.xcworkspaceMyApp/MyApp.xcodeproj。 可以使用萬用字元。 深入瞭解 檔案比對模式


scheme - 方案
string.

選擇性。 指定 Xcode 配置名稱。 必須是 Xcode) 中 [受控 配置] 底下的 [共用配置 (共用配置] 核取方塊。 如果您未指定配置,而且指定的工作區具有單一共用配置,則會使用工作區配置。


xcodeVersion - Xcode 版本
string. 允許的值: 8 (Xcode 8) 、 9 (Xcode 9) 、 10 (Xcode 10) 、 11 (Xcode 11) 12 、 (Xcode 12) 、 13 (Xcode 13) 、、 defaultspecifyPath (指定路徑) 。 預設值:default

指定 Xcode 的目標版本。 選取 Default 以在代理程式電腦上使用預設版本的 Xcode。 例如,指定版本號碼 (, Xcode 9) 依賴代理 (程式電腦上的環境變數所設定的版本位置,例如) XCODE_9_DEVELOPER_DIR=/Applications/Xcode_9.0.0.app/Contents/Developer 。 選取 Specify path 以提供 Xcode 開發人員目錄的特定路徑。


xcodeVersion - Xcode 版本
string. 允許的值: 8 (Xcode 8) 、 9 (Xcode 9) 、 10 (Xcode 10) 、 11 (Xcode 11) 、 default (specifyPath 指定路徑) 。 預設值:default

指定 Xcode 的目標版本。 選取 Default 以在代理程式電腦上使用預設版本的 Xcode。 例如,指定版本號碼 (, Xcode 9) 依賴代理 (程式電腦上的環境變數所設定的版本位置,例如) XCODE_9_DEVELOPER_DIR=/Applications/Xcode_9.0.0.app/Contents/Developer 。 選取 Specify path 以提供 Xcode 開發人員目錄的特定路徑。


xcodeVersion - Xcode 版本
string. 允許的值: 8 (Xcode 8) 、 9 (Xcode 9) 、 10 (Xcode 10) 、 defaultspecifyPath (指定路徑) 。 預設值:default

指定 Xcode 的目標版本。 選取 Default 以在代理程式電腦上使用預設版本的 Xcode。 例如,指定版本號碼 (, Xcode 9) 依賴代理 (程式電腦上的環境變數所設定的版本位置,例如) XCODE_9_DEVELOPER_DIR=/Applications/Xcode_9.0.0.app/Contents/Developer 。 選取 Specify path 以提供 Xcode 開發人員目錄的特定路徑。


xcodeDeveloperDir - Xcode 開發人員路徑
string. 選擇性。 使用 時機 xcodeVersion == specifyPath

指定特定 Xcode 開發人員目錄的路徑, /Applications/Xcode_9.0.0.app/Contents/Developer 例如 () 。 當代理程式電腦上安裝多個 Xcode 版本時,此輸入會很有用。


packageApp - 建立應用程式套件
boolean. 預設值:false

指定是否將 IPA 應用程式套件檔案產生為組建的一部分。


archivePath - 封存路徑
string. 選擇性。 使用 時機 packageApp == true

指定放置已建立封存的目錄。


exportPath - 匯出路徑
string. 選擇性。 使用 時機 packageApp == true 。 預設值:output/$(SDK)/$(Configuration)

指定從封存匯出之產品的目的地。


exportOptions - 匯出選項
string. 選擇性。 使用 時機 packageApp == true 。 允許的值: auto (自動) 、、 plistspecify 。 預設值:auto

指定匯出封存的選項。 選取 的 Automatic 預設值時,會自動從封存偵測匯出方法。 選取 Plist 即可指定包含匯出選項的 plist 檔案。 選取 Specify 以提供特定的匯出方法和小組識別碼


exportMethod - Export 方法
string. 當 exportOptions == specify 時為必要。 預設值:development

指定 Xcode 用來匯出封存的方法。 例如:app-storepackagead-hocenterprisedevelopment


exportTeamId - 小組識別碼
string. 選擇性。 使用 時機 exportOptions == specify

指定匯出期間要使用的 Apple Developer Portal 10 字元小組識別碼。


exportOptionsPlist - 匯出選項 plist
string. 當 exportOptions == plist 時為必要。

指定 plist 檔案的路徑,其中包含匯出期間要使用的選項。


exportArgs - 匯出引數
string. 選擇性。 使用 時機 packageApp == true

指定匯出期間使用的其他命令列引數。


signingOption - 簽署樣式
string. 允許的值: nosign (不要) 代碼符號、 default (Project 預設) 、 manual (手動簽署) , auto (自動簽署) 。 預設值:nosign

指定簽署組建的方法。 選取 Do not code sign 以停用簽署。 選取 Project defaults 即可只使用專案的簽署組態。 選取 Manual signing 即可強制手動簽署,並選擇性地指定簽署身分識別和布建設定檔。 選取 Automatic signing 即可強制自動簽署,並選擇性地指定開發小組識別碼。 如果您的專案需要簽署,請使用 安裝 Apple... 工作,在 Xcode 組建之前安裝憑證和布建設定檔。


signingIdentity - 簽署身分識別
string. 選擇性。 使用 時機 signingOption = manual

指定要用來簽署組建的簽署身分識別覆寫。 可能需要解除鎖定代理程式電腦上的預設金鑰鏈。 如果未輸入任何值,則會使用 Xcode 專案的設定。


provisioningProfileUuid - 布建設定檔 UUID
string. 選擇性。 使用 時機 signingOption = manual

指定用於組建之已安裝布建設定檔的 UUID。 在 iOS、tvOS、watchOS () 的單一工作區中,使用不同的配置或目標來指定布建設定檔。


provisioningProfileName - 布建設定檔名稱
string. 選擇性。 使用 時機 signingOption = manual

指定用於組建的已安裝布建設定檔名稱。 如果指定,這會優先于布建設定檔 UUID。 在 iOS、tvOS、watchOS () 的單一工作區中,使用不同的配置或目標來指定布建設定檔。


teamId - 小組識別碼
string. 選擇性。 使用 時機 signingOption = auto

如果您是多個開發小組的成員,則為必要專案。 指定 10 個字元的開發小組識別碼。


destinationPlatformOption - 目的地平臺
string. 允許的值: default 、 (iOS 和 watchOS) 、、 tvOSmacOScustomiOS 預設值:default

指定當泛型組建裝置無效時,用於 UI 測試的目的地裝置平臺。 選擇 Custom 指定此清單中未包含的平臺。 選取時 Default ,不會將模擬器或裝置設為目標。


destinationPlatform - 自訂目的地平臺
string. 選擇性。 使用 時機 destinationPlatformOption == custom

指定當泛型組建裝置無效時,用於 UI 測試的目的地裝置平臺。 選擇 Custom 指定清單中未包含的平臺。 選取時 Default ,不會以模擬器或裝置為目標。


destinationTypeOption - 目的地類型
string. 選擇性。 使用 時機 destinationPlatformOption != default && destinationPlatformOption != macOS 。 允許的值: simulators (模擬器) , devices (連線的裝置) 。 預設值:simulators

指定要用於 UI 測試的目的地類型。 裝置必須透過纜線或網路連線連接到執行組建的 Mac。 如需詳細資訊,請參閱 Xcode 中的 裝置和模擬器


destinationSimulators - 類比
string. 選擇性。 使用 時機 destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == simulators

指定用於 UI 測試的 Xcode 模擬器名稱。 例如, iPhone X (iOS 和 watchOS) 或 Apple TV 4K (tvOS) 。 選擇性的目標 OS 版本可以指定為 格式 OS=<versionNumber> ,例如 iPhone X,OS=11.1 。 如需詳細資訊,請參閱裝載 macOS 代理程式上安裝的 模擬器清單。


destinationSimulators - 類比
string. 選擇性。 使用 時機 destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == simulators 。 預設值:iPhone 7

指定用於 UI 測試的 Xcode 模擬器名稱。 例如, iPhone X (iOS 和 watchOS) 或 Apple TV 4K (tvOS) 。 選擇性的目標 OS 版本可以指定為 格式 OS=<versionNumber> ,例如 iPhone X,OS=11.1 。 如需詳細資訊,請參閱裝載 macOS 代理程式上安裝的 模擬器清單。


destinationDevices - 裝置
string. 選擇性。 使用 時機 destinationPlatformOption != default && destinationPlatformOption != macOS && destinationTypeOption == devices

指定用於 UI 測試的裝置名稱,例如 Raisa's iPad 。 目前僅支援一個裝置。 請注意,Apple 不允許裝置名稱中的單引號 (') 。 相反地,可以使用右引號 (') 。


args - 參數
string.

選擇性。 指定要建置的其他命令列引數。 此輸入適用于指定 -target-project 引數,而不是工作區/專案和配置。 請參閱 Apple:使用 Xcode 常見問題從命令列建置


workingDirectory - 工作目錄
輸入別名: cwdstring.

選擇性。 指定要在其中執行組建的工作目錄。 如果未輸入任何值,則會使用存放庫的根目錄。


useXcpretty - 使用 xcpretty
boolean. 預設值:true

指定是否要使用 xcpretty 來格式化 xcodebuild 輸出。 xcpretty 必須安裝在代理程式機器上, (它已預先安裝在 Azure Pipelines 裝載的組建代理程式上) 。 如果未 xcpretty 安裝 ,則會顯示原始 xcodebuild 輸出。 如需詳細資訊,請參閱 xcpretty


xcprettyArgs - Xcpretty 引數
string. 選擇性。 使用 時機 useXcpretty == true

如果 xcpretty 已啟用,則此輸入會指定 的 xcpretty 引數。 請參閱 GitHub 上的 xcpretty 引數清單


publishJUnitResults - 將測試結果發佈至 Azure Pipelines
boolean. 預設值:false

指定是否要將 JUnit 測試結果發佈至 Azure Pipelines。 這需要 xcpretty 啟用才能產生 JUnit 測試結果。


publishJUnitResults - 將測試結果發佈至 Azure Pipelines/TFS
boolean. 預設值:false

指定是否要將 JUnit 測試結果發佈至 Azure Pipelines/TFS。 這需要 xcpretty 啟用才能產生 JUnit 測試結果。


testRunTitle - 測試回合標題
string. 選擇性。 使用 時機 publishJUnitResults == true

如果 xcprettypublishJUnitResults 已啟用,您可以指定測試回合標題。


工作控制選項

除了工作輸入之外,所有工作都有控制選項。 如需詳細資訊,請參閱 控制項選項和一般工作屬性

輸出變數

無。

備註

使用此工作在 macOS 上建置、測試或封存 Xcode 工作區,並選擇性地封裝應用程式。

使用多個布建設定檔

目前不支援 Xcode 工作 (多個布建設定檔,例如 iOS 應用程式延伸模組) 。

範例

建置 Xcode 應用程式

規格需求

需求 描述
管線類型 YAML,傳統組建
執行于 Agent、DeploymentGroup
要求 自我裝載代理程式必須具備符合下列需求的功能,才能執行使用此工作的作業:xcode
Capabilities 此工作不符合作業中後續工作的任何需求。
命令限制 任意
Settable 變數 任意
代理程式版本 所有支援的代理程式版本。
工作類別 Build