CocoaPods UIImageView+AFNetworking.h unrecognized selector setImageWithURLRequest

前端 未结 3 1970
梦谈多话
梦谈多话 2021-02-09 08:20

I have installed AFNetworking 2.1.0 with CocoaPods on Xcode 5.

//ViewController.h
#import 
#         


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

    Check the PodFile. May be it is setting the instlalation "pod 'AFNetworking', '~> 3.0'" for another target.

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

    I had the same problem and the above solutions didn't fix it. It was a stupid mistake. I only included the .h, instead of both .h and .m

    0 讨论(0)
  • 2021-02-09 09:18

    I had the same problem with Xcode 5, Cocoapods and AFNetworking 1.3.3.

    I found my answer in this Google Groups discussion: AFNetworking unrecognized selector

    Make sure your project and target settings aren't overwriting the values in the xcconfig file.

    Each level should have (at least) $(inherited) to inherit the settings of the parent.

    In Build Settings, make sure you have $(inherited) in Other Linker Flags.

    Build Settings before I added $(inherited) (choose Levels, not Combined):

    Other Linker Flags without $(inherited)

    Build Settings after I added $(inherited):

    Other Linker Flags with $(inherited)

    That fixed it for me.

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