![]() In this way, the projects can be redefined using a “user friendly” format composed of more concise and readable rules. To solve most of these problems, some engineers in the iOS community came up with the idea of automatically generating the project files. As an example of one possible issue, if multiple engineers are working in parallel and trigger changes on the same project file, there is a high chance that this will result in painful git conflicts. ![]() Maintaining project files has always been a problem for iOS developers, especially as the number of contributors working on the same codebase grows. To give you a better understanding of this, in December 2019, we had more than 80,000 lines of code representing our project. Now let’s try to imagine how large this file would be in a project of the size of the SoundCloud iOS app, which is composed of thousands of source files and split across dozens of frameworks with multiple targets, hundreds of build settings, and complex linking rules. Project Files Are for Computers, Not for Humans Furthermore, a single file addition creates changes in different sections of the project file, which needs to respect a specific format and particular conventions, or else it would result in an invalid project that can’t be opened. The first thing you may notice is that the generated code is not easy to read or change, as it uses unique random identifiers to refer to every entry of the project. Every time you make a change to an Xcode project, such as adding a new source file or changing a setting, the IDE generates some code into a file called project.pbxproj.įor example, here is an extract of changes that are automatically generated by Xcode when creating a new file: Xcode is the official tool for developing apps on Apple platforms. ![]() In this blog post, we will discuss the problems of maintaining a complex iOS project, how we managed to simplify the process by writing less and more consistent code, and how we ended up with lower build times as an unexpected result. There is the same order of magnitude between the ratio of these two planets and the amount of code that defined the SoundCloud iOS project before - Jupiter - and after - Earth - generating it using Tuist. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.Planet Earth vs. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: I'm far from being an experienced iOS/Mac developer, but I've at least gotten my feet wet. If you have any requests on how to create a certain type of app or something like that, shoot be a message. I'll sometimes write tutorials for creating iOS or Mac apps on my website, and you can check out all the existing tutorials here: Don't expect fully functional apps, this code will mostly be for demonstrating how to use a certain feature in Xcode, or something like that. I'll be posting the code for some sample Xcode projects that I've done here.
0 Comments
Leave a Reply. |