i have a swift XCode project and i want to import Chartboost framework inside it. it works fine when i import the framework but when i close XCode and re-open, it gives error and says that could not find the files although the files are right there. here is the error :
'Chartboost/Chartboost.h' file not found
Failed to import bridging header '/..../project-Bridging-Header.h'
there are other frameworks inside the project but they do not give any error. i have to delete the framework and then copy it every time i close XCode. how do i fix this ?
1.Please check the Framework Search Path in Target .If this frame work exists in folder name with space for example "Silly Things" .Then it will take two lines.So you have to give the name "Silly\ Things" in Framework Search Path.
2.If you are removing and adding again and again.Then it is just appending again and again in framework path.
So if you are closing and then opening it is not finding with suggested path and might be ending with this error.
Related
I have an iOS project using swift language which is running normal. Because I worry about the project may miss or other, I copied the project from this address to another address.
when I open this project and run this project. I got those two error tints:
"SVProgressHUD.h" file not found
Failed to import bridging header
I don't understand why this error is happen. And the project in older address is ok.
Has anyone experienced this problem?
on the file manager (left), click on your SVProgressHUD.h file, and look at the path on the utility window (right), or just right click -> show in finder. You will probably find that your file is not where it's supposed to be.
So I am trying to add a static library to my project in order to interface with a scanner. I have linked the binary in build phases to the libCaptuvoSDK.a, put the Captuvo.h header file in the project folder, and finally set the project to always search the user paths and added $(BUILT_PRODUCTS_DIR) recursive to the user header search paths. After doing all this I am trying to use #import "Captuvo.h" in my ViewController.swift file and getting the 2 errors Expected identifier in import declaration, and Expected expression. I have tried different combinations of importing and none of them seem to make a difference so I am led to believe the issue is with my process of adding the library.
I am new to Xcode and have never used a third party library in an application before so I feel I may be making a simple mistake or just misinterpreting things. Any help is appreciated!
Okay so I managed to fix my issue! I had imported the static library properly but the real issue was the header file. I fixed my issue by creating a new file in my projects folder named Quick-Scan-Bridging-Header.h. Inside that file is where the #import "Captuvo.h" line belonged. Once that was done I opened the Quick Scan apps build settings and under Objective-C Bridging Header I added the path Quick Scan/Quick-Scan-Bridging-Header. I also added the Header Search Path $(BUILT_PRODUCTS_DIR)
After I did all this I am able to use the Captuvo classes in my ViewController.swift file.
I just added FacebookSDK.Framework. but in my app delegate i am importing #import. But i got error like this “Facebook/Facebook.h” file not found. But i just drag and drop the facebooksdk framework. But still getting same error. I am also fixing in Build settings (Framework Search Path). still getting same error. I am giving Frameworksearch path like this “/Users/xxx/Desktop/xxxx/FacebookDemo”. Actually i am following the tutorial.”How to make Xcode find file FacebookSDK.h?” But still i got same error. SO Please guide me any body.. i am using xcode7.
Just check where it is downloaded in Downloads or Documents.
next
click on project->targets->framework search path add
$(PROJECT_DIR)/your project name
also add this
/Users/{username}/Documents/FacebookSDK
FacebookSDK-this should be your downloaded SDK name
As a beginner in ObjectiveC I need some help.
I'm working on a phonegap plugin for IOS (so, written with objective C). I use some open source code but I got an error with an .h import.
My architecture look like:
myFmk.framework/
myFmk.framework/ABCDE/myFmk.h <== in a sub folder
myFmk.framework/myFmk <=== this is a file
myPlugin.h
myPlugin.m
In myPlugin.h I have #import and in "myFmk.framework/myFmk" file I have only one line "ABCDE/".
I thought that this file do a redirection of the absolute import (with brackets) but my complier told me that "myFmk/myFmk.h" is not found.
I tried to find some documentation about this feature but I wasn't able to find its name... do you have this documentation or the feature name?
Thks.
Is the framework added using a cocoapod? If not, did you follow the instructions properly for adding it to your project? It would probably help if you posted the framework you are experiencing problems with.
If this is a framework that is added to your project properly and you are unable to import there are a few things you should check. First, go to your project settings (click on the project at the very top of your file tree in the left column) and then look for "linked libraries". See if the library is listed there. If not click the + and try to add it.
If this framework was added via cocoapods another thing to check is search your file structure for libPods.a. If it is red, I find sometimes it is helpful to delete it, close the project and run pod install again.
Also if you installed the project via cocoapods remember to open the workspace and not the old xcode project file.
I have also experienced this problem when my header search paths and other linker flag paths were wrong. Linker Flags should be $inherited if this is a cocoapod. In my projects most Header search paths are $inherited too.
If none of this is helpful please provide more information such as how this framework was added to your project and what the framework is. Also let us know if you get any error messages.
I'm using the Parse and PubNub SDK in my project called My Sample App and since I updated my Xcode to 6.3.1 I can't run the project because Xcode doesn't find the header files. I had the same issue with the previous version, but then I just needed to delete and add them again to make it work, unfortunately it doesn't work now. I also tried to delete the Library Search Path and Framework Search Path without any success. Is there any trick that fixes this issue?
This is the exact error:
'PNImports.h' file not found
Add $(PROJECT_DIR) to your Library Search Path in project settings AND select recursive option
Surround Library Search Path with single quotes