Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Xcode 15.4: "Swift.h" file not found for simulator

I'm currently adding swift widgets to my existing ObjC project and building it for ios-simulator causes a "Swift.h" file not found error. it works without issue for device build. I see the file compiled under DerivedData at and set the Header Search Path and User Header Search Path to: $(CONFIGURATION_TEMP_DIR)/$(PROJECT_NAME).build/DerivedSources but it still doesn't work.

Removing the #import "proj-Swift.h" line fixes the issues, but I need to import it to use WidgetCenter ReloadAllTimelines. I checked that the file is being generated correctly by viewing the autogenerated file and its contents.

Any advice and direction would be a great help. Been stuck on this all week and I can't think of a different solution.

Are you able to shrink your project down to its bare essentials to share it here while reproducing this issue? If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project.

— Ed Ford,  DTS Engineer

Xcode 15.4: "Swift.h" file not found for simulator
 
 
Q