I have no idea why this is happening. I've installed AFNetworking in my project via a Podfile. Here's the current entry:
pod 'AFNetworking', '~> 1.2'
However when I call:
#import "AFHTTPClient.h"
at the top of one of my files, it says "'AFHTTPClient.h' file not found". If I open up the Pods directory, AFNetworking is in there along with AFHTTPClient.h. I have no idea what's going on. Any ideas?
It can be because 'HEADER_SEARCH_PATHS doesn't have proper path to search in your added Pod(AFNetworking).
> Open xcworkspace (as after adding podfile/s it is recommended to open xcworkspace instead xcodeproj) and do the following:
Alternative approach (Referred from iOS - Build fails with CocoaPods cannot find header files ):
In app target , to "User Header Search Paths" entry add following (including quotes)
"${PODS_ROOT}/BuildHeaders"
checking 'recursive'
I hope this will solve this File not found issue.
do you open xcworkspace? or xcodeproj? if you use CocoaPods, you always should work only with xcworkspace.
can you find other pods? try to clean the project and try again.
check whether you've done everything from this list: Creating a project that uses CocoaPods
someone had the same problem recently - can't search header path?. try to check your header search path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With