20. May 2021

Xcode: How to quickly filter only errors from the build

The best software practice tells you that you should not have build warnings in the projects. It’s easier to spot a potential problem.

Sometimes it’s necessary to import larger portion of code which generates many warnings and it’s very hard to find the error which blocks compilation of iOS or macOS application in Xcode.

The quick way to filter out warnings and see only errors in Xcode is to click X icon at the bottom of Issue Navigator with the title “Show only errors”:

1. October 2020

How to display Debug Console with output from the application in Xcode

When you hit Build and Run button in Xcode the application will start.

If everything is ok you should see messages from the application displayed in the lower right part of Xcode window. The Console output contains text printed by the application.

Sometimes it might happen that there is no Console output window. How to fix it?

Here is small tip for Xcode developers.

To show/hide the Console click the icon Show/Hide the console in the lower right corner. It’s the last icon on the lower right side of the panel.

21. September 2020

How to install upgrade of Xcode 12 when there are just few GBs free on the mac

Xcode was always a big bundle. Each release was slightly bigger and an user has to remove some software to install the upgrade.

The release of Xcode 12 is way bigger and it requires more than 40 GB of free disk space to install the upgrade.

The question is: How to install Xcode 12 when there is nothing else to delete?

Simply: Go to Launchpad and throw Xcode to Recycle Bin to uninstall the current version of Xcode.

This step will release the space consumed by Xcode 11. The delete process will take several minutes and you can check your disk for free space.

df -h

Once you have sufficient disk space then open App Store, search for Xcode and perform new installation.

22. June 2018

How to display build log in Xcode

Xcode has a very minimalistic design when working with build errors. Sometimes it’s necessary to get more information about a failed build and it might not be obvious how to do it.

The answer is simple and it’s one click away.

Click on the last icon (text bubble) in the top left panel.

Now select the build and you’ll see all build information.

22. October 2017

SDL2_image for iOS with JPEG image format

Adding SDL2_image with JPEG support for iOS is a little bit different than for Android. In case of Android, it was necessary to add JPEG library in C and build it. iOS has JPEG dependency hidden in another library which is already compiled in frameworks.

If you just add SDL2_image to your project for iOS, you will very likely end up with following linker error:

"_kUTTypeJPEG", referenced from ...
Linker command failed with exit code 1

To resolve this issue, it is sufficient to add two dependencies into your project.

Go to Project and select Build Phases.

In the section Linking add library: ImageIO.framework

Then add the second dependency: MobileCoreServices.framework

Then Clean and Build the project.

These steps should resolve the linker issue, and JPEG should work.