Problem with Legacy Build option in XCode 13

Hi

I have been running into an issue using projects that require legacy build with XCode 13, for some reason projects I’m trying don’t always build the expected Debug vs Release scheme. My steps to reproduce:

  1. In Projucer, create new plug-in project with legacy build system set to enabled
  2. Open in XCode 13.0
  3. Try to build, get error about using the old build system, so visit project settings and enable “do not show a diagnostic issue about build system deprecation” to correct (not a big deal)
  4. Build (debug, as is the default), success.
  5. Edit scheme, set build configuration to Release
  6. Build: does not do anything
  7. Clean. Build. Builds debug binary despite being in Release scheme.
  8. Close XCode

Solution 1:
9. Show package content of the project’s xcodeproj bundle
10. Delete project.xcworkspace (which contains the info which sets up a legacy build project and basically undoes the Projucer’s work to set up a the legacy build)
11. Open project again in XCode 13
12. Set Build system to legacy build in project settings and click to disable deprecation warning again
13. Build Debug, success
14. Edit scheme, set build configuration to Release
15. Build Release, success

Conclude: the usual method used to enable legacy build is causing an issue in XCode 13

Solution 2:
9. In Projucer, set legacy build system to disabled, save and open project in XCode
10. Set Build system to legacy build in project settings and click to disable deprecation warning again
11. Build Debug
12. Edit scheme, set build configuration to Release
13. Build: successfully builds Release

Having taken a look at the contents of the project bundles there may be other ways that need to be looked into for legacy build support in Projucer’s XCode 13 compatibility.

In some of my older projects I found the same problem switching schemes and deleting .xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings resolved the issue, so I feel like it’s probably not isolated to the test case.

Thanks
Matt

Thanks for the report. I’ve pushed a fix for this to develop here:

You’ll need to re-build the Projucer with this commit and re-save your project.

Though it’s never quite that simple… This commit will restore warning suppression compatibility with older xcode versions:

I checked the fix in XCode 11 and 13, plus I also back-ported into my 5.x tree and it fixed the issue there too, very handy, thanks Ed.