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?

+3


source to share


6 answers


I've tried with Xcode6.1-Beta too. But still it is not possible to update the path of the objective-c header. I don't know where the config file is. I refused to find out.



Finally, I deleted the target xcode project and recreated a new project. Now it works.

+1


source


You need to update the path in your Build Options project to point to the new location of the bridge header.

Click on your target, then click on "Customize settings," then find Objective-C Bridging Header



enter image description here

+5


source


You will find the path to the header header in the target build settings under "Swift Compiler - Code Generation" / "Objective C Bridging Header".

+3


source


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.

0


source


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.

0


source


In my case, I changed the path from relative path to absolute path and resolved.

as

C: project_name / project_name-bridge-header.h

To: $ (SRCROOT) /project_name/project_name-Bridging-Header.h

0


source







All Articles