Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"AFNetworking.h" file not found in .pch file

I installed AFNetworking using cocoapods. And then I included AFNetworking.h file in Prefix.pch file. Now while building my app it shows "AFNetworking.h" file not found error. I think it's an error related to path.

Thanks.

like image 545
Kiran Thapa Avatar asked Oct 15 '14 04:10

Kiran Thapa


2 Answers

This happened to me when I updated to AFNetworking 2.5.0 from 2.4.1 through Cocoapods.

In XCode go to Product -> Scheme -> Manage Schemes. There delete the project (maintaining the pods) and add the project again. It worked for me.

Hope it helps ;)

like image 88
Ricardo Anjos Avatar answered Sep 29 '22 09:09

Ricardo Anjos


for me replacing

#import "AFNetworking.h" 

to

#import <AFNetworking/AFNetworking.h>

fix the issue.

like image 35
Howard Liu Avatar answered Sep 29 '22 09:09

Howard Liu