xcode cocoapods library not found error

只谈情不闲聊 提交于 2019-12-24 11:28:52

问题


tearing my hair out for a week now. using cocoapods and recently upgraded from using facebook login via facebook-iOS-SDK(deprecated) to fbsdkcorekit.

podfile is as follows

platform :ios, '8.0'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'

getting following error

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

I have followed faq in cocoapods for this type of error and nothing seems to work. Any help appreciated.

entire error as follows

Ld Build/Products/Debug-iphonesimulator/komunety.app/komunety normal i386 cd /Users/lawrenceflancbaum/Dropbox/AppleDev/AppDev/komunety export IPHONEOS_DEPLOYMENT_TARGET=8.1 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk -L/Users/lawrenceflancbaum/Dropbox/AppleDev/AppDev/komunety/Build/Products/Debug-iphonesimulator -F/Users/lawrenceflancbaum/Dropbox/AppleDev/AppDev/komunety/Build/Products/Debug-iphonesimulator -filelist /Users/lawrenceflancbaum/Dropbox/AppleDev/AppDev/komunety/Build/Intermediates/komunety.build/Debug-iphonesimulator/komunety.build/Objects-normal/i386/komunety.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lBolts -lFBSDKCoreKit -lFBSDKLoginKit -weak_framework Accounts -weak_framework AudioToolbox -weak_framework CoreGraphics -weak_framework CoreLocation -weak_framework Foundation -weak_framework QuartzCore -weak_framework Security -weak_framework Social -weak_framework UIKit -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/lawrenceflancbaum/Dropbox/AppleDev/AppDev/komunety/Build/Intermediates/komunety.build/Debug-iphonesimulator/komunety.build/Objects-normal/i386/komunety.swiftmodule -mios-simulator-version-min=8.1 -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/lawrenceflancbaum/Dropbox/AppleDev/AppDev/komunety/Build/Intermediates/komunety.build/Debug-iphonesimulator/komunety.build/komunety.app.xcent -framework CoreLocation -framework CloudKit -framework MapKit -lPods-komunety -lPods -Xlinker -dependency_info -Xlinker /Users/lawrenceflancbaum/Dropbox/AppleDev/AppDev/komunety/Build/Intermediates/komunety.build/Debug-iphonesimulator/komunety.build/Objects-normal/i386/komunety_dependency_info.dat -o /Users/lawrenceflancbaum/Dropbox/AppleDev/AppDev/komunety/Build/Products/Debug-iphonesimulator/komunety.app/komunety


回答1:


try this:

Delete the -lPods-Projectname.a in Link Binary (for newer versions, delete the -lPods-Projectname.a under the Frameworks group).

reference from HERE.

If that not works try this:

  1. In your main Project (not Pods) select main target
  2. Go to Buld Phases tab
  3. Go to Link Binary with Libraries
  4. Remove library, that cause problem (probably it would be red color)
  5. Do a full clean, build & run



回答2:


i ended up re building the project from the start. I tried doing dharmesh's suggestions and also all instrux in cocoapods faq but i think something was corrupted or not set properly in build settings. Starting over was only fix i could find



来源:https://stackoverflow.com/questions/31691503/xcode-cocoapods-library-not-found-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!