The bridging file is added, but keeps showing the error.
My Bridging Header File is correctly setup because the other imports are successful.
I would advise you to use CocoaPods to handle external frameworks. Here is SlackTextViewController. If you still want to use copied version, make sure you add the files to your project. Try copying the files to your project folder using Finder and then use Xcode File -> Add files to "YOUR_PROJECT"
Related
I followed this URL.
https://medium.com/#kevinhuyskens/implementing-swift-in-unity-53e0b668f895
But I have issues.I have attached issue image
Here is some info might help;
Clean project folder,
Check the location address of the bridging header file in the build settings
Be sure framework is integrated to project.
Also check if the bridging header has all the class that has to communicate each other.
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?
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
You'll find the path to the bridging header in your target's Build Settings, under "Swift Compiler - Code Generation"/"Objective C Bridging Header".
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.
Yes it's possible.
Delete the .h file
Clear the path at Objective-C Bridging Header
Create new Objective-C File
Name your header file to the same name as before (popup will ask you to create new header file)
Goto File > Project Settings > Data Location
Make sure your path is correct and press "Done"
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.
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.
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
I have imported the folder containing SUPQueueConnection.h to the project and to the project root too. Still it is showing the same error SUPQueueConnection.h file not found.
And we imported all such needed .h and .m files to the project root.
Is there any other way for doing it?
Can anyone please help me in solving this problem?
In project navigation bar of your project check the folder you imported that it actually contains SUPQueueConnection.h file or not and if it is there try to import header file in the class in which you are using "SUPQueueConnection.h" file.Also if project is showing SUPQueueConnection.h file then right click on this file and click "Show IN Finder" option to see where actually the file is.Make sure it is copied in project folder.
If it does not solve the problem try deleting this file and drag and drop SUPQueueConnection.h again in project directly and make sure while copying on target your project is check marked.
Have you made sure that the files that aren't found are actually in your Xcode project? Make sure you can see the files somewhere in the sidebar. I've never actually tried it, but I don't think you can simply access files in the project directory root, they must be in your project. Xcode has changed since I used it last (been doing other things) but I think you can still add files by right clicking somewhere in your sidebar, also unless its changed you can add external files using a button in the file menu
I removed a file from the Framework section of my Xcode application and now I want to add the file back. However when I try to add the file back I get the following alert.
Could not copy /Users/brian/Downloads/iphone-exif-0-9.1(1)/Release-simulator-iphonesimulator/libiphone-exif.a to /Developer/CS193/GraffitiMap/libiphone-exif.a.
What is going on here?
When you add a file in you project, you can either copy it in you project or just reference the file somewhere else on your hard drive.
When you removed the file from you project, you didn't remove it from you project folder. Xcode can't write at that path since there's already a file, and gives you an error.
Just remove the file that's already in your project folder from the Finder.
How do I add c library to Xcode Cocoa project?
Or what is the best option, I don't want to copy them into Cocoa project directory.
I have a C project called a which compiles into library a.dylib and header file a.h, the project is located in it's own directory.
I want to use this library from my objective-c application in Xcode.
How do I add the header file and library to my Xcode project?
I can drag the a.dylib into other frameworks but what do I do with a.h?
I figured it out.
I point to location of project a deployment directory (headers) to Search Path in project settings either:
as Header Search Paths, if used as <a/a.h>
or into User Header Search Paths, if used as "a/a.h"
As for library I just drag it to Xcode project and set it to refer to library instead of copy.
Here are the steps before adding a header file test.h in your project. Here is the files location root -> Library -> include -> test.h
click on build settings
Find User Header Search path. add your header file location here. add following value to Debug, Release and Any Architecture field. $(SRCROOT)/Library/include. Your project Root is the folder that contains your project, it conatins .xcodeproj file.
After adding path you will be able to add header in like this
# include "test.h"
You can drag them both the .a and .h files to Xcode, but make sure to not check the "Copy items to project folder". As for referencing the header file, you'll need to put it in a place where you can add a path to it in your #include/#import statements. Is there a reason you don't want to copy the header to your project file?