PrefixHeader.pch file can't find headers

前端 未结 4 718
粉色の甜心
粉色の甜心 2021-02-08 21:53

I have a small prefix header file

#ifndef UP_FOR_IT_PrefixHeader_pch
#define UP_FOR_IT_PrefixHeader_pch

#ifdef __OBJC__
    #import 
    #         


        
相关标签:
4条回答
  • 2021-02-08 22:00

    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

    0 讨论(0)
  • 2021-02-08 22:04

    Just in case rest of the answers doesn't work for someone. Try changing Under "Target Membership", the scope of your targets from public to project. Hopefully it helps.

    0 讨论(0)
  • 2021-02-08 22:10

    If you are using cocoapods, you may checkout this link. I got this problem but none of the solution above worked for me.

    I'm using cocoapods, the reason is that in the Podfile I only linked pods to default target. If you are going to add another one, you should add another target configuration in Podfile(target:'target' do). Usually the new one is the same to the original one, you could use link_with to make life easier.

    But life is not always that easy. It looks like that link_with is deprecated. You may checkout this link.

    0 讨论(0)
  • 2021-02-08 22:14

    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

    0 讨论(0)
提交回复
热议问题