Reputation: 2194
XCode gives me an error that cannot find header file, but command-clicking on the header opens the header file. The strange behaviour is that in another class of the same project the same header file is recognized. This header is inside a custom framework. I correctly import it with
#import <CustomFramework/FancyHeader.h>
XCode Version 6.1.1 (6A2008a)
What I have tried:
But with no luck.
Edit
I noticed that I cannot import it in more than one file. What might be the problem?
Narrowing down:
A.h, A.m, B.h, B.m
Works
A.m:
#import A.h
#import B.h
#import <CustomFramework/FancyHeader.h>
Does not work if I add in B.h
#import <CustomFramework/FancyHeader.h>
Please help! :)
Upvotes: 1
Views: 818
Reputation: 1313
I just generally go by:
For OS X software developers the guideline for including header files and linking with system software is straightforward: add the framework to your project and include only the top-level header file in your source files.
But in a general sense, defining the target of a framework lets your app know the scope to use those resources. It also allows for you to import those libraries into a targeted project. And it determines what resources your app will need to load into memory in order to work properly.
The guide I've linked explains the framework in better detail. And it's also worth checking out the Project Editor Help docs
Upvotes: 1