Skip to main content

Xcodebuild for Testing

This step builds your application and generates an IPA for testing so that it can be used in test automation frameworks like BrowserStack or Testinium.

Prerequisites

In order for this step to work correctly, it must be used after the two steps listed below.

Prerequisite Workflow StepDescription
Xcode SelectThis step selects the Xcode version that is specified.
CocoaPods InstallThis step installs all the dependencies of the pod file.
Screenshot
caution

If you use SPM (Swift Package Manager), Xcode will manage itself when a project build. The CocoaPods Install step is not necessary.

Input Variables

You can find the parameters required for this step to work and detailed explanations in the list below.

Screenshot
Variable NameDescriptionStatus
$AC_REPOSITORY_DIRSpecifies the cloned repository directory. This path will be generated after the Git Clone step.Required
$AC_SCHEMESpecifies the project scheme for build. If you filled in Config => Build Schema in the Configuration, this variable comes from Configuration.Required
$AC_ARCHIVE_FLAGSSpecifies the extra xcodebuild flag. For example: -quietOptional
$AC_PROJECT_PATHSpecifies the project path. For example: ./appcircle.xcodeproj. This variable comes from Configuration.Required
$AC_CONFIGURATION_NAMEYou can build your project with any configuration you want. Specify the configuration as hard-coded. Appcircle will automatically add this configuration to the xcodebuild command. For example; DebugOptional
$AC_COMPILER_INDEX_STORE_ENABLEYou can disable indexing during the build for a faster build. The default value is No.Optional
$AC_DESTINATIONThis parameter determines for which destination the application will be built and IPA will be generated. The default value is generic/platform=iOS, which means that it will be built for all iOS devices.Required

Output Variables

This component outputs some important parameters after running.

Variable NameDescription
$AC_TEST_APP_PATHThis parameter is the path of the application after the build is complete. If you are using a test automation tool, you can use this path as the app path.
$AC_UITESTS_RUNNER_PATHThis path is the UI Runner Path for running UI tests after the build is complete. This variable is sent to test automation tools to run the tests.
$AC_XCTEST_PATHThis variable is the path containing the tests.
$AC_UITESTS_RUNNER_IPA_PATHThis variable is the path that the IPA generated for the test creates for the UI tests to run. This can be sent directly to test automation tools.
$AC_XCTEST_ZIP_PATHPath to the IPA version of the Xctests. You can access it directly via this path.
$AC_TEST_IPA_PATHThis path holds the IPA file created for running tests and sending the IPA file to test automation tools.

To access the source code of this component, please use the following link:

Preview of GitHub - appcircleio/appcircle-ios-build-for-testing