Xcode 6 beta build will fail after moving -Bridging-Header objective-c swift xcode6
I ran into a build failure error after moving the Bridging-Header objective-c quickly on xcode6. Before I moved the header file it worked fine. The error indicates that the header file does not exist. The path to the header file is still the old path in the error log. I tried to build a clean one, but the old path remains. How do I clear the objc-header path?
source to share
Yes it is possible.
- Delete .h file
- Clear Path in Objective-C Top Level Console
- Create New Objective-C File
- Name your header file the same name as before (a popup will ask you to create a new header file)
- Go to File> Project Settings> Data Location
- Make sure your path is correct and click Finish
Your application should start again, pointing to the correct location of the header file and removing the ModuleCache files
Happens to me many times when I move my application folder.
source to share
I had a workspace that I used when I had the same. I moved the project to a different folder. Despite the relative path in my bridging headers, it still referenced the same location on build and errors.
Here's what I did to fix it:
-
Close the work area
-
Open the .xcworkspace file with TextWrangler. TextWrangler allowed me to move the package to / xcuserdata / [username] .xcuserdatad / UserInterfaceState.xcuserstate. I searched the old way and found it. Make changes to the new location of the header file.
-
That alone didn't fix it. After cleaning and building, the old value showed a backup! Then I deleted the Build folder. It has a ModuleCache which I think held on to the old value as well.
After that my project took on my new value and I was able to create the project. I'm not sure if the second step needs to be taken. But he retained the old meaning there.
source to share