Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AFNetworking pod install use of unresolved identifier methods

I install Mixpanel to my project and AFNetworking doesn't work anymore and in all methods show me this error:

Use of unresolved identifier 'AFHTTPRequestOperationManager'

But Xcode have link to the class in the method, I tried pod install, pod update, clean the project and it doesn't work

In PodFile:

target 'My Project' do
    pod 'AFNetworking'
    pod 'Mixpanel'
end

target 'Mi ProjectTests' do
end

In Bridging-Header:

#import <AFNetworking.h>
#import <Mixpanel/Mixpanel.h>

enter image description here

and the last error show is:

ld: framework not found -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos
like image 867
Eduardo Oliveros Avatar asked Jan 25 '26 06:01

Eduardo Oliveros


1 Answers

To AFNetworking 3.0 version:

let manager = AFHTTPSessionManager()

To solve the last error go to Build Settings, Other Linker Flags and remove all except $(inherited)

like image 174
Learn Swift Avatar answered Jan 26 '26 21:01

Learn Swift



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!