Gieta Laksmana
  • Blog
  • Profile
  • Projects
    • VR World Arcade
    • Punch For Fun
    • Spectrum
    • Dimension Battle
  • Resume

XCode10 and prebuild script output files xcfilelist

10/14/2018

0 Comments

 
​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.
Picture
Picture
​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:
Picture
​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.​ 
Picture
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
Picture
Picture
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

0 Comments



Leave a Reply.

    Archives

    September 2018
    August 2018
    July 2018
    September 2017
    July 2017
    November 2016
    October 2016
    September 2016
    June 2016
    May 2016
    March 2016

    Categories

    All
    Shenanigans
    Software Engineering
    Swift
    Vr
    Xcode

    RSS Feed

Powered by Create your own unique website with customizable templates.