Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PrefixHeader.pch file can't find headers

Tags:

xcode

ios

I have a small prefix header file

#ifndef UP_FOR_IT_PrefixHeader_pch
#define UP_FOR_IT_PrefixHeader_pch

#ifdef __OBJC__
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    #import <Parse/Parse.h>
    #import "ABConstants.h"
    #import "ABCache.h"
    #endif
#endif

it can't find Parse.h. I linked it from Link binary with libraries everything seems right but whatever I tried it does't compile. I tried removing the lib and import again but nothing changed. Removed indexes on derived data but still no clue.

What should I try? It took 2 hours and still not working.

Xcode 6. IOS 8

like image 933
sftsz Avatar asked Sep 22 '14 12:09

sftsz


2 Answers

Goto Build Settings > Apple LLVM 6.0 - Language > Prefix Header

Add here: $(SRCROOT)/PrefixHeader.pch

enter image description here

If $(SRCROOT) not working for you, set the value of 'Prefix Header' to your PCH file name, with the project name - i.e. for project named 'Test-Project' and PCH file named 'Test-Project-Prefix.pch' and add the complete string 'Test-Project/Test-Project-Prefix.pch'

enter image description here

like image 69
user8675 Avatar answered Sep 28 '22 17:09

user8675


Select your project (named "Project" for example) and click on "ProjectTests" (in TARGETS section). Then, go to Build Phases > Link Binary With Libraries and add Parse.framework

like image 26
JonyMateos Avatar answered Sep 28 '22 16:09

JonyMateos