Found another quirk with XCode 10. Although this time they did mention it on their release notes (I read the release notes after I hit this issue).
Let's say you have a simple project that generates a file on your pre-build phase, and you include that file on the compilation phase.
Let's say you have a simple project that generates a file on your pre-build phase, and you include that file on the compilation phase.
This setup will work just fine on Xcode 9 with the old build system. However, on the new build system on Xcode 10, when you build the project for the first time you will get an error saying that the file couldn't be found:
When you try to check if the file was there, you will be hit with confusion as the file is generated properly. So what's up with that?
According to Xcode 10 release notes, you now have to explicitly add the generated files name in the Output Files field of the phase, otherwise the build system might try to search for the files before they are generated.
According to Xcode 10 release notes, you now have to explicitly add the generated files name in the Output Files field of the phase, otherwise the build system might try to search for the files before they are generated.
If you have several generated files that are being used by multiple targets and don't want to duplicate your efforts, you can use the new xcfilelist file that is available for XCode 10. Simply list the generated files inside the xcfilelist, and assign the xcfilelist as an Output File Lists of the phase
aand voila, the build system should now find your file correctly
Here's the full Xcode 10 release notes:
https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes/build_system_release_notes_for_xcode_10
Here's the full Xcode 10 release notes:
https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes/build_system_release_notes_for_xcode_10