Reputation: 2443
I am facing build fail error after moving Bridging-Header objective-c swift on xcode6. Before I moved header file, it had been working fine. The error shows header file not exist. The header file path remains still old path in error log. I tried build clean, but still old path remains. How can clean the objc-header-path?
Upvotes: 5
Views: 4773
Reputation: 924
In my case, I changed the path from relative path to absolute path and solved.
like
From: project_name/project_name-Bridging-Header.h
To: $(SRCROOT)/project_name/project_name-Bridging-Header.h
Upvotes: 0
Reputation: 93
I had a workspace that I was using when I had the same thing happen. I moved my project to a different folder. Despite having a relative path on my bridge headers, it was still referencing the old location when building and threw an error.
Here's what I did to fix this:
Close the workspace
Open the .xcworkspace file using TextWrangler. TextWrangler allowed me to navigate the package to /xcuserdata/[username].xcuserdatad/UserInterfaceState.xcuserstate. I did a search for the old path and found it. Make the change to the new location of the header file.
This by itself didn't fix it. After cleaning and building, the old value showed back up! Then I deleted the Build folder. It has a ModuleCache that I think was holding on to the old value as well.
After doing this, my project picked up my new value and I was able to build the project. I'm not certain step 2 is necessary. But it did store the old value in there.
Upvotes: 0
Reputation: 1
Yes it's possible.
Your app should run again pointing to the right location of the header file and delete the files ModuleCache
Happens to me many times when i move app folder around.
Upvotes: 0
Reputation: 2443
I tried with Xcode6.1-Beta, as well. But still impossible to update the objective-c header path. I don't know where the configuration file is. I gave up to figure out.
Finally, I deleted the target xcode project and recreated new project. Now it is working.
Upvotes: 1
Reputation: 3974
You need to update the path in your project's Build Settings to point to the new bridging header location.
Click your target and then click 'Build Settings' then search for Objective-C Bridging Header
Upvotes: 9
Reputation: 38238
You'll find the path to the bridging header in your target's Build Settings, under "Swift Compiler - Code Generation"/"Objective C Bridging Header".
Upvotes: 3