Symptoms
When working in Build Automation after changing the Xcode version, some build errors related to Fastlane might appear, such as the following:
[error] /BUILD_PATH/.rvm/gems/ruby-2.7.4/gems/bvr-7.3.13.2.7.4/lib/bvr/build/handlers/platform/xcode_compiler.rb:319:in `block in exec_fastlane': Build Failure (RuntimeError)
To diagnose the cause of these Fastlane errors in Build Automation, it is necessary to perform a local build of your Unity project using Fastlane.
When attempting to reproduce UBA issues locally for iOS builds, it is always recommended to build your project in batch mode (article linked below) and then build the resulting Xcode project using Fastlane (this article).
Sections included in this article
1. Building your project in batch mode.
3. Building your app with Fastlane.
Resolution
1. Building your project in batchmode.
Build your project on a local macOS machine in batchmode following these steps.
2. Installing Fastlane.
Go to Fastlane's setup page and install it on your macOS machine by following these steps.
3. Building your app with Fastlane.
Go to the folder of the Xcode project Unity built and build it using Fastlane by following these steps.
Make sure there is a Gemfile in your built project folder and a Fastfile in the Fastlane folder:
Once you run the fast file (for this example it is called 'beta'), you will see a resulting log, like this one:
After inspecting the log, errors like the following might appear, which will provide us with some clues on the cause of the build errors:
error: exportArchive: No signing certificate "iOS Distribution" found
...
error: exportArchive: Provisioning profile "WildcardAll" is not an "iOS App Store" profile.
More Information
Fastlane Documentation (External)
--------------