2

After I updated my Xcode toXcode 8.

I found out that if I import vendor framework header files in .pch file. there will be a error. 'xxx' .h file not Found

Such as:
I want to import a framework named Umeng's header file. So I write the codes below to my XXX-prefix.pch

#import <UMMobClick/MobClick.h>

But Error UMMobClick/MobClick.h file not found appeared.

Any constriction of Xcode that prohibit importing vendor framework header files in .pch file?

Sailendra
  • 1,318
  • 14
  • 29
generalzyq
  • 303
  • 3
  • 11

3 Answers3

0

I had a similar problem with a legacy Xcode project that used a .pch file -- the file was being ignored.

The fix was in build settings, where the original path to this file assumed it began at the project root:

SharkAlert/SharkAlert-Prefix.pch

Xcode 8 apparently requires an explicit reference to the starting point

$(SRCROOT)/SharkAlert/SharkAlert-Prefix.pch

Now the project builds as expected.

SteveCaine
  • 512
  • 4
  • 13
0

If this file you are used to bridge OC and Swift,now you should creat a new .header file and Move All Header file Name inside file

Avinash Mishra
  • 797
  • 9
  • 19
0

I had a similar issue. Changing #import <Framework/Framework.h> to @import Framework; fixed it for me.

bunnyhero
  • 757
  • 2
  • 10
  • 23