Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't use AFHTTPRequestOperationManager

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

like image 354
Hongxu Jin Avatar asked Nov 24 '15 12:11

Hongxu Jin


2 Answers

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

like image 161
Hongxu Jin Avatar answered Sep 23 '22 02:09

Hongxu Jin


Please check the profile - AFNetworking version

Change to

pod 'AFNetworking', '~> 2.5.4'

and use

import "AFHTTPRequestOperationManager.h"

like image 45
Binoy jose Avatar answered Sep 20 '22 02:09

Binoy jose