Can't use AFHTTPRequestOperationManager

前端 未结 3 1694
自闭症患者
自闭症患者 2021-02-19 08:34

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

AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
<         


        
相关标签:
3条回答
  • 2021-02-19 09:08

    Please check the profile - AFNetworking version

    Change to

    pod 'AFNetworking', '~> 2.5.4'

    and use

    import "AFHTTPRequestOperationManager.h"

    0 讨论(0)
  • 2021-02-19 09:13

    In Your View controller .h file add

    #import <AFNetworking/AFHTTPRequestOperationManager.h>

    And then check it

    0 讨论(0)
  • 2021-02-19 09:28

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

    0 讨论(0)
提交回复
热议问题