Cocoapods and Xcode, ld: library not found for -lAFNetworking
Asked Answered
P

2

4

I have this pod file contains all of these libs

platform :ios, "7.0"

target "PP for iPad" do
pod 'AFNetworking', '1.1'
pod 'RaptureXML', '1.0'
pod 'NoticeView'
pod 'iVersion'
pod 'iRate'
pod 'Facebook-iOS-SDK', '3.13.1'
pod 'StackMob'
pod 'SSZipArchive'
pod 'ODRefreshControl'
pod 'SDWebImage'
pod 'TPKeyboardAvoiding'
pod 'LXPagingViews'
pod 'AQGridView'
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
end

I ran it successfully with 'pod install' ... but when I try to run my project i get this error

ld: library not found for -lAFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)

any idea how to solve this error?

Patricapatrice answered 16/9, 2015 at 14:55 Comment(2)
Check my answer here: https://mcmap.net/q/362844/-xcode-ld-library-not-found-for-lafnetworkingBrutality
I ran on a similar issue and I could solve it like this: https://mcmap.net/q/16296/-library-not-found-for-lpods-afnetworkingWithdrawn
S
4

Maybe you need set the property Build Active Architecture Only to NO in Target->Build Settings for Debug (in the Pods Project and/or in the target AFNetworking of Pods project). Also make sure that the corresponding Valid Architectures are included (e.g. 'armv7 arm64'). You may have received a Compilation Warning while building the project.

Shears answered 19/9, 2015 at 11:55 Comment(1)
Yes, it does work. You have to toggle the ONLY_ACTIVE_ARCH setting in Target (not in Project) to YES and back to NO in order to reset some internal Xcode's cache reference.Virulent
M
1

Try to makes your ONLY_ACTIVE_ARCH setting in Target (not in Project) to YES and back to NO in order to reset some internal Xcode's cache reference.(NOTICE: Must make it YES first and then set it back to NO).

Munos answered 15/8, 2017 at 1:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.