简体   繁体   中英

xcode cocoapods library not found error

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 @exec utable_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 -framewor k 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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM