4 Replies
      Latest reply on Sep 13, 2019 5:01 PM by QuinceyMorris
      OCS1 Level 1 Level 1 (0 points)

        When you add a new file to a target, Xcode somehow decides whether to add the thing to “Compile Sources” or to “Copy Bundle Resources” build phase.

         

        Anyone knows what this decision is based on?

         

        Namely, anyone knows how to affect it with a new UTI?

         

        I have added (through a separate application which exports it) a new UTI for Groovy sources; it works very well — Xcode sees the UTI all right, correctly assigns it to newly added *.groovy files, shows the proper icon etc. Nevertheless, there's one rather inconvenient problem: when a new Groovy source is added to a target, it goes to its “Copy Bundle Resources”.

         

        I have made sure my Groovy source UTI conforms to the standard “public.source-code” UTI, in a hope Xcode would detect that and put automatically those to “Compile Sources”; alas, in vain.

         

        What do I need to do to ensure that Xcode automatically puts sources of a given UTI to the “Compile Sources” build phase of selected target(s)?

         

        At the moment, I am working with version 9.4.1 (9F2000).

         

        Thanks a lot,

        OC