Pretty and smart Xcode archive step logs

The last 10 lines of prettified Xcode logs are included in the standard logs to make debugging smoother.

In our Xcode build steps we use xcpretty to prettify the output of the raw Xcode build log. The raw logs are stored in a temporary directory, so if you want to inspect a failure in detail, you can find the original output.

While xcpretty produces much more digestible output, it is quite common that you can't tell the exact error from the prettified output, but it's included at the end of the raw Xcode build log. So we updated our Xcode steps to print the last 10 lines of the build log into the standard output if the step failed and the output tool was xcpretty. This does not concern the full log, the file is still available.

The new log looks this pretty. 😉

▸ Check Dependencies

❌  Code signing is required for product type 'Application' in SDK 'iOS 10.3'

If you can't find the reason of the error in the log, please check the raw-xcodebuild-output.log
The log file is stored in $BITRISE_DEPLOY_DIR, and its full path
is available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable
Archive failed, error: exit status 65
|                                                                              |
| x | [31;[email protected] (exit code: 1)                            | 19 sec   |
| Issue tracker:      |
| Source:                    |
Copy code

The end of the raw log looks like this:

Check dependencies
Signing for "Ngenic Tune" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'


The following build commands failed:
	Check dependencies
(1 failure)
Copy code

Happy prettifying!

Explore more topics

App Development

Learn how to optimize your mobile app deployment processes for iOS, Android, Flutter, ReactNative, and more

Bitrise & Community

Check out the latest from Bitrise and the community. Learn about the upcoming mobile events, employee spotlights, women in tech, and more

Mobile App Releases

Learn how to release faster, better apps on the App Store, Google Play Store, Huawei AppGallery, and other app stores

Mobile DevOps

Learn Mobile DevOps best practices such as DevOps for iOS, Android, and industry-specific DevOps tips for mobile engineers

Mobile Testing & Security

Learn how to optimize mobile testing and security — from automated security checks to robust mobile testing and more.

Product Updates

Check out the latest product updates from Bitrise — Build Insights updates, product news, and more.