Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regenerating the Bridging-Header and -Swift.h files after project name change

I have previously built a Keyboard extension project that has components of both Swift and Objective C. I'd like to built a new Keyboard app based on my previous app, with the simple goal of changing the name, keyboard UI and some keyboard mechanics.

I followed the guidelines here on duplicating and renaming an XCode Project. I even managed to get the project to compile after changing the Bundle IDs (for both the container app and the underlying keyboard). However, because of the name of the Targets have now changed, I am get the error that the following files:

#import "NewNameContainerApp-Swift.h"
#import "NewNameContainerApp-Bridging-Header.h"

cannot be found (these errors persist despite me manually changing OldNameContainerApp-Bridging-Header.h to NewNameContainerApp-Bridging-Header.h. It seems that the project has not regenerated a new set of bridging header and -Swift.h files matching the names of my new target.

My question is - is there a way to force XCode to regenerate a new set of these files? And if not, where do I find OldNameContainerApp-Swift.h so I can manually change it to NewNameContainerApp-Swift.h?

Thanks!

like image 680
daspianist Avatar asked Sep 02 '25 17:09

daspianist


1 Answers

Check in your applications Define-Module in the build section. Update it to your latest project name. To find it easily just search for Defines-Module and see if it needs updating. If it is updated try cleaning your project or deleting your Derived Data

like image 194
Jesse Onolemen Avatar answered Sep 04 '25 07:09

Jesse Onolemen