Can't use AFHTTPRequestOperationManager

Hongxu Jin picture Hongxu Jin · Nov 24, 2015 · Viewed 13.9k times · Source

I got a problem when I'm using AFNetworking. I wrote this in my code:

AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];

I do add those files in my project, and I also try pod them into my project like this. But the compiler still told me "use of undeclared identifier 'AFHTTPRequestOperationManager'". Someone can help me?

screenshot:screenshot

Answer

Hongxu Jin picture Hongxu Jin · Mar 31, 2016

In fact, it's because after AFNetworking 3.x, there is no AFHTTPRequestOperationManager any more. You should use AFHTTPSessionManager instead.