It is difficult to find out the issue from the above error message alone, as the exit code 65 is used as a general xcodebuild error code. Hence there could be many reasons why the build failed at the archive step.
You can try the following steps to troubleshoot this problem.
- Check your Code Signing setting
- Check your environment variables. (For example: Build Number) If the build succeeds on your local machine but fails in the CI environment, there could be environment variables defined on the local machine, but not made available to builds on CircleCI, causing the build to fail.
- Check fastlane's log for more information about why the fastlane command failed. The log may contain details about the root cause of the error, for instance missing provisioning profiles. The log path is printed in the output of the fastlane command, for example: /Users/distiller/driver-application/buildlogs/gym/DriverApplication-DriverApplication.log You could either SSH into a rebuild to access the log or upload the file as an artifact.
- Check if Xcode SDK version should be defined in the gym configuration in the Fastfile
gym( sdk: "iphoneos11.4" )
(Setting the sdk option results in the -sdk argument being specified in the xcodebuild command that fastlane uses)