Xcode 14: One Icon to Rule Them All!
How many times have we found ourselves preparing countless icons of all the sizes required by Apple for our applications: sizes for iPhone and iPad and for different utilities — Spotlight, Notifications or App. Generating so many icons of different sizes was tedious if you did it manually, and something simpler and you used an icon generator (which from an icon, normally 1024x1024px, generated all the necessary sizes). But now with Xcode 14, as Apple announced at WWDC 2022, it will only be necessary to configure the Assets catalog of our application so that it only uses a 1024x1024px icon. Xcode 14 will take care of resizing this icon according to its needs.
How to configure an application with a single icon
Once we have created our project with Xcode 14, we go to the Assets catalog. From the outset, we will see the same configuration as before, that is, a template to fill with the different sizes of icons.
Therefore, we have the option of filling them one by one with the different icons.
AppIcon asset filled with icons of different sizes. But, Xcode 14 introduces the option to use a single 1024x1024px icon. To do this, we simply go to the column on the right (to the Attributes inspector) and, in Device, select Single Size (for example, in the case of iOS).
In this way, the icon template is reduced to a single case, that of 1024x1024px.
This new functionality of Xcode 14 has some limitations:
- It is only available for iOS, iPadOS, and watchOS. For macOS, icons of different sizes are still required.
- When this option is selected, it is for all icon sizes. That is, if we want an icon of a certain size to be different, we will have to configure them all one by one.
Being able to use a single icon for the results of our application both in a reduction in the work time dedicated to generating the icons and in the fact that, by using a single image, the size of our apps is reduced.
When developing software we find ourselves with the need to manage the changes that are being made in the code and that, when working as a team, all team members always have a copy of this code in which they can work and, later, integrate these changes.
Introduction to Dependency injection If you are like me, when developing an application you are always looking (although sometimes it is difficult) to use a series of ‘rules’ that help you to make the code cleaner, be as uncoupled as possible, be scalable…
In previous articles we had seen how to improve the architecture of our code through design patterns and the use of SOLID principles.