This guide covers how to:
- Add a new app
- Define build configuration
- Handle external dependencies
- Sign code
- Run tests
- Publish your build artefacts
- Manage build versions
- Click Add a new app on Nevercode dashboard.
- Choose whether to add your application via supported providers using OAuth or add it manually using the other available authentication methods.
After specifying app repository, Nevercode takes a first look at it by listing the
branches in this repository. The next step for you is to select the branch you want Nevercode to scan for projects.
Before continuing with scanning the repo, you can define some additional settings using our environment variables and files functionality. For example, you can add a magic variable
NC_PLATFORM with the value
fastlane_ios to ensure the project is detected correctly. This is recommended when you have two native apps in your repo or your repo does not contain a
.xcodeproj file (applies to projects created with XcodeGen).
See the full list of supported magic variables here.
- Select a
branchfrom the dropdown that Nevercode should scan. Note that you can change the branch later if needed.
- Click Scan branch.
Nevercode scans the repository from the specified branch. This includes cloning the repository, looking up the available
Fastfilesand listing the pre-configured
lanes. All this can be monitored in real time via the live log window in your browser.
- Once scanning the branch has finished, choose the
lanewhich will be executed as the main build step by Nevercode.
- Finalize the setup by checking the appropriate build options and click Save and start build.
Nevercode does not automatically install CocoaPods, Carthage or any other external dependencies for fastlane projects. Please use fastlane's built-in actions, such as
cocoapods and [
carthage],(https://docs.fastlane.tools/actions/carthage/) to gain control of that.
Match from the
Fastfile, keep in mind that you need to grant access to the credentials repository and expose the Match passphrase during the build. Both can be securely achieved thanks to the well designed environment variable support of fastlane and Nevercode's support for several SSH keys for authentication.
In your app settings on Nevercode, navigate to the Environment tab to manage environment variables and files:
- Match passphrase can be defined as a
MATCH_PASSWORDenvironment file — this will be automatically detected by fastlane and used to decrypt the credentials repository.
- You can upload the SSH key for cloning the credentials repository as an environment file, i.e.
MATCH_SSH_KEY. All environment files whose variable name has the suffix
_SSH_KEYwill be automatically added to the SSH agent and will be ready for use during the whole build process.
Using environment variables and files to grant access to credentials
Testing on Nevercode with fastlane is 100% automatic. By default,
scan is used to invoke the test run, but you can easily swap it out for any other
lane that you have configured for your test runs. Test results are automatically collected and you don't need to do anything to convert the results from one format to another or place them in a special location on the build machine.
Configuring fastlane scan
In case you wish to run tests as part of the main build step, we suggest that you use Trainer to generate reliable JUnit results from the test run and put the results in a directory where we can discover them:
You can use either fastlane to take care of artefact distribution or choose from a number of Nevercode's own integrations.
To make build artefacts available on Nevercode and use it for build distribution, we will check the
$GYM_OUTPUT_DIRECTORY folder for artefacts. If this folder does not exist, we will look for
*.ipa files in project directory.
To make your build version management easy, Nevercode exports the
NEVERCODE_BUILD_NUMBER environment variable that you can use in your build script. For instance, your could make use of it within
increment_version_number action to define a new version for each build.