Unable to build complex Mac app project with 8 targets since upgrading to Mac OS Sequoia

I have a complex project that used to compile without any problems that i could not solve before I bought a new iMac (the latest, M4), which came with macOS Sequoia. I've ben able to compile the whole project since 1998, which has evolved into an AppKit Mac app written almost completely in Swift. I am also able to compile this project on Xcode 16.1 on MacOS Sonoma. However, since I upgraded to MacOS Sequoia, I am stumped with lots of errors that I don't know how to fix. Many of them are related to new build system, which works fine in smaller projects I have written, but it completely breaks when I use this more complex project. I've been unable to create a focused project so I can file a DTS incident, because when I try to recreate it in a new, more focused project, the problem goes away. I tried to transfer the code to a freshly created project, and I was able to make it build again without errors, but then this new project just creates empty bundles without any resources and executables in them. In almost 25 years of experience in coding, I've never encountered such huge problems with just a MacOS upgrade. I would like to have some guidance on how to proceed. Here is an example of the errors I'm getting:

error: unable to write file '/SchIS64.build/Objects-normal/arm64/SchIS64.LinkFileList': fopen(/SchIS64.build/Objects-normal/arm64/SchIS64.LinkFileList, wb): No such file or directory (2) (in target 'SchIS64' from project 'Scheduler (Cocoa)')

WriteAuxiliaryFile /SchIS64.build/unextended-module.modulemap (in target 'SchIS64' from project 'Scheduler (Cocoa)')
    cd /Users/admin/Documents/Development/Scheduler/Scheduler
    write-file /SchIS64.build/unextended-module.modulemap

WriteAuxiliaryFile /SchIS64.build/unextended-module-overlay.yaml (in target 'SchIS64' from project 'Scheduler (Cocoa)')
    cd /Users/admin/Documents/Development/Scheduler/Scheduler
    write-file /SchIS64.build/unextended-module-overlay.yaml

WriteAuxiliaryFile /SchIS64.build/SchIS64.hmap (in target 'SchIS64' from project 'Scheduler (Cocoa)')
    cd /Users/admin/Documents/Development/Scheduler/Scheduler
    write-file /SchIS64.build/SchIS64.hmap

To reply my own question, after a lot of tinkering I was able to solve my problem by:

  1. Moving the whole project to a freshly created project; AND by

  2. Removing an Xcode custom setting that put the build folder inside the project folder instead of the default path, which is inside the DerivedData folder.

This solved all my issues, but what a bummer with lost time. It seems that the new build system does not like us to change this default setting on MacOS Sequoia while working perfectly well on Sonoma.

Hope this helps someone!

I had a similar issue. My macOS framework tests couldn't be executed anymore via xcodebuild on macOS Sequioa with Xcode 16.1. Everything was fine on macOS Sonoma however. The custom -derivedDataPath points to a subfolder inside the project directory and it turns out that Xcode didn't have the rights to write an executable inside my Documents directory and its subfolders. After giving Xcode 'Full Disk Access' (Privacy & Security) the unit test bundle is now created correctly as an executable and the tests run fine again.

Funny enough this only affects the macOS build target, not the other platforms (iOS, tvOS, watchOS etc). Additionally I could reproduce the issue in a freshly created dummy project.

Thanks for chiming in. I’ve been fixing some bugs caused by the moving to a new project because, for example, some build settings for the Info.plist do not match the previous settings. I wI’ll check if that solved my problem with the previous origimal project.

Unable to build complex Mac app project with 8 targets since upgrading to Mac OS Sequoia
 
 
Q