问题
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?
回答1:
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.
回答2:
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).
来源:https://stackoverflow.com/questions/32612101/cocoapods-and-xcode-ld-library-not-found-for-lafnetworking