Uploaded image for project: 'Swift'
  1. Swift
  2. SR-2811

Generated Xcode projects need to allow .xcconfig files to override project settings

    XMLWordPrintable

    Details

      Description

      In the rewritten Xcode project generator, all build settings are generated into the project file, with the goal of keeping the generated project as simple as possible. The previous implementation always generated three intermediate .xcconfig files, in addition to the optional one passed in by the user: Project.xcconfig, Debug.xcconfig, Release.xcconfig.

      The Project.xcconfig file contained definitions of these settings: `PRODUCT_NAME`, `SUPPORTED_PLATFORMS`, `MACOSX_DEPLOYMENT_TARGET`, `DYLIB_INSTALL_NAME_BASE`, `OTHER_SWIFT_FLAGS`, `COMBINE_HIDPI_IMAGES`, and `USE_HEADERMAP`

      In the reworked generator, all settings are emitted to the project file, getting rid of the extra config file. However, this turns out to be too simplistic. Because Xcode considers .xcconfig files to be at a lower precedence than the project settings, this means settings in the user-provided .xcconfig file can not override those at the project level.

      Even though only a small set of build settings could be overridden (those listed above), this is a semantic change from the previous behavior, and needs to be fixed, even though it means going back to a more complex generated project. Moreover, this should be fixed so that the other, currently hardcoded settings, can also be overridden (e.g. `SWIFT_VERSION`).

        Attachments

          Activity

            People

            • Assignee:
              abertelrud Anders Bertelrud
              Reporter:
              abertelrud Anders Bertelrud
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: