iOS - Build fails with CocoaPods cannot find header files iOS - Build fails with CocoaPods cannot find header files ios ios

iOS - Build fails with CocoaPods cannot find header files


Update

Make sure your Podfile includes link_with on targets missing a config file. Cocoapods only sets the first target by default otherwise. e.g.

platform :osx, '10.7'pod 'JSONKit',       '~> 1.4'link_with 'Pomo', 'Pomo Dev', 'Pomo Tests'

------ End Update


Note: Please do note that you have to look into Project->Info->Configurations for steps below.


I had similar symptoms and found that the pods.xcconfig file was not being included in the specific target I was trying to build. Some of the other suggested solutions worked for me, but this one seemed to address part of the underlying issue.

Pods.xcconfig not working

The simple solution was to change set the configuration file for the targets that didn't have one set.

Pods.xcconfig working


Update

I've updated this since my original answer, that got the downvote, so I hope this helps. And if it does, hopefully it will get my vote back.

If the headers aren't being imported, you probably have a conflict in the HEADER_SEARCH_PATHS. Try and add $(inherited) to the header search paths in your Build Settings to make sure that it pulls in any search paths included in the .xcconfig file from your CocoaPods.

This should help with any conflicts and get your source imported correctly.


1.Check

build settings -> Search Path -> User Header Search Paths ->

  • "${PODS_ROOT}/" recursive

enter image description here

enter image description here

enter image description hereenter image description here

2.Check import style(KEY POINT), if your's podfile have set

use_frameworks!

In yours File-Bridging-Header.h,the formatter should like this

#import "MBProgressHUD.h"

else should be below

#import <MBProgressHUD.h>

3.That must be work! trust me