Can't use AFHTTPRequestOperationManager
14,640
Solution 1
In fact, it's because after AFNetworking 3.x, there is no AFHTTPRequestOperationManager any more. You should use AFHTTPSessionManager instead.
Solution 2
Please check the profile - AFNetworking version
Change to
pod 'AFNetworking', '~> 2.5.4'
and use
import "AFHTTPRequestOperationManager.h"
Author by
Hongxu Jin
Updated on June 05, 2022Comments
-
Hongxu Jin about 2 years
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
-
Hongxu Jin over 8 yearsIt said 'AFNetworking/AFHTTPRequestOperationManager.h' file not found.
-
Hongxu Jin over 8 yearsI added the screenshot.
-
Maulik Patel over 8 yearsYou remove class AFNetworking & Uikit + AFNetworking From your project on shown in first two. Only keep in pod
-
Hongxu Jin over 8 years@MaulikPatel It still doesn't work. you can see it in screenshot2 in my question. And if I add #import "AFHTTPRequestOperationManager.h", it still can't be found.
-
Hongxu Jin over 8 yearsYes I am, you can see the pods in project navigator.
-
Maulik Patel over 8 yearsIt's very strange issue..Because in my all project every time i use AFNetworking & CocoaPod .But can't Face this problem .I just add Header file as i say in answer.Can you Share your basic project?
-
Hongxu Jin over 8 yearsSure, may I send it to your mailbox?
-
Maulik Patel over 8 yearsyou have dropbox account?
-
Maulik Patel over 8 yearsif yes then send me in dropbox
-
Hongxu Jin over 8 yearsI'm sorry I don't have one. So may I use mailbox?
-
Rushi trivedi over 8 years@Maulik Patel any solution? i have got same issue