Cocoapod: Why Xcode build process try to find the

2019-01-29 09:27发布

Thank you always for all of your knowledge.

I have checked my issue in StackOverflow and found similar issues but could not find my case specifically. Greatly appreciated If some of you could advise my situation.

My environment;

xcode: Version 6.0.1, ios target: IOS 8, code: OBjective-C

I opened my project by Myproject.xcworkspace.

Issue;

I used Cocoapod to install some libraries. Here was the code in podfile.

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '6.0'
pod 'SDWebImage', '~> 3.6'
pod 'AFNetworking', "~> 2.0"
pod 'KissXML'

Then in terminal.

pod install

After all I knew I did not need some of these libraries, then modify podfile like below.

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '6.0'
pod 'SDWebImage', '~> 3.6'

Then in terminal.

pod update

I found AFNetworking and KissXML are removed from my project.

However when I did Product->Archive in Xcode, the following error occurred.

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

and

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

Just Run went succeeded but Archive came up with those error.

Why build process still try to find libraries which has been already removed?

Thank you always.

2条回答
一夜七次
2楼-- · 2019-01-29 10:17

open your project build setting ,may be there are some link or other library link or library path in it . Your remove it .

查看更多
戒情不戒烟
3楼-- · 2019-01-29 10:33

By @Feng Lin's advise, I solved my issue, so I answer my question for your knowledge.

Target -> Build Setting -> Linking -> Other Linker Flags

Click text, and remove those you have enter image description herealready removed from podfile. In my case, AFNetworking and KissXML.

Done!

查看更多
登录 后发表回答