Build ordering in Xcode scheme build targets
Xcode lets you change the order of these items in the UI but the order doesn't seem to do anything.
In my case, this was happening when "Parallelize Build" was ticked in the Scheme "Build" tab.
After disabling that checkbox, Xcode always followed the order I chose for the targets.
It makes sense if you think about it: when "Parallelize Build" is enabled, all targets without dependency constraints between them will be built in parallel, which may result in their out-of-order completion.
On the other hand, if you wish their sequential order to be strictly followed, well.. that's exactly the contrary of parallel building, and hence you should disable that option.
Make targets A, B, and C target dependencies for the installer target, which will ensure A, B, and C are built before the installer. Select your project file from the project navigator to open the project editor. Select the installer target from the list of targets. Click the Build Phases button at the top of the editor to show the target's build phases. Click the disclosure triangle next to the Target Dependencies build phase. Click the + button to add dependencies.
When you add the target dependencies, targets A, B, and C will be built before the installer. If you need A, B, and C to be built in a specific order, you will have to add more target dependencies.
In Xcode 13, the manual order is now stated to be strongly recommended against and will get you a warning.