1

I cloned a repo I'm working on from GitHub and I ran pod install on it. The Xcode project has many dependencies (all of which are installed using Cocoapods), however, the only error I am getting is with AFNetworking.

Here's the error I am getting :

enter image description here

Every other dependency is working and its setup exactly the way AFNetworking is, however, all the AFNetworking classes are not being recognized. Any help ?

Here's the podfile:

platform :ios, '7.0'

target 'Name' do
    pod 'AFNetworking'
    pod 'MWPhotoBrowser'
    pod 'STPopup'
    pod 'KINWebBrowser'
    pod 'JMImageCache'
    pod 'Fabric'
    pod 'Crashlytics'
end

target 'NameTests' do

end

target 'NameUITests' do

end
ishaq
  • 1,781
  • 1
  • 11
  • 19
  • What is your set up? Are you writing Swift or Objective-C? Which version of AFNetworking, and why not Alamofire? Also, do you have Bitcode enabled? Please paste your podfile if possible – diatrevolo Feb 01 '16 at 20:36
  • Latest version of AFNetworking is being used, app uses both Objective-C and Swift, edited post to include `podfile`, Bitcode is enabled. – Sam Fischer Feb 01 '16 at 20:40
  • Off the top of my head, you'll have to add `AFNetworking.h` to your Objective-C bridging header, since AFN is an Objective-C framework. I expect you are not having problems in your Objective-C classes? – diatrevolo Feb 01 '16 at 20:45
  • The bridging header has `` in it. – Sam Fischer Feb 01 '16 at 20:46
  • Hmm...here's a recommendation that has worked for me before...http://stackoverflow.com/a/24102433/239318 – diatrevolo Feb 01 '16 at 20:49
  • Since you're using Swift, go with Alamofire instead of AFNetworking – Alan Scarpa Feb 01 '16 at 21:51

3 Answers3

0

Update your AFNetworking.Make sure CocoaPods 0.39.0+ is required to build AFNetworking 3.0.0+.

Xayoung
  • 1
  • 1
0

try this

1.first remove all form podfile then hit pod install

  1. after that put back all the file and hir pod install

it will remove akn install your pods again

hope it will work.works for me as well

0

AFHTTPRequestOperation and AFHTTPRequestOperationManager are not available in 3.0.0. It has been removed. Please see this guide

OguzzYlcn
  • 59
  • 5