How Can I Inspect the Size Impact of Symbols in an App Binary: A Practical Guide for Apple Developers

In the previous posts we talked about Build Pipeline, Jargon, Static Linker vs Dynamic Linker. In this post weโ€™ll benefit from the knowledge gained about the app wrapperโ€™s folder structure and the placement of all the different binaries (frameworks and main appโ€™s executable) to know where to look for. New in this post is learning how to use the nm command to inspect and count the number of symbols of each binary. Symbols What are symbols? A symbol is a name to refer to a fragment of code or data Fragments of code may reference other symbols (e.g., when a function calls another function) For more see WWDC 2018 - Behind the Scenes of the Xcode Build Process ...

Optimizing Binaries - High Level Xcode Build Pipeline

This the first post of a series Iโ€™m doing on how to optimize your appโ€™s binaries. The post is more of a high level intro. Depending on the action (build, run, test, profile, analyze, archive) of your scheme, the process will have all or some of the following steps: Dependency analysis What happens when you press build? So the first step is for the build system to take the build description, your Xcode project file. Parse it, take into account all the files in your project, your targets and the dependency relationships. Your build settings, and turn it into a tree-like structure called a directed graph. And this represents all the dependencies between the input and output files in your project and the tasks that will be executed to process them. Next the low-level execution engine processes this graph, looks at the dependency specifications and figures out which tasks to execute. The sequence or order in which they must be run and which tasks can be run in parallel. Then proceeds to execute them. From WWDC 2018 - Behind the Scenes of the Xcode Build Process 4:57 ...