library not found for -lPods-AFNetworking

烂漫一生 提交于 2019-11-30 11:30:21

Instead of opening the XCode project, you should open up the WorkSpace file.

I was facing the same problem and following solution worked for me:

  1. Go to project setting -> build setting -> other linker flag, and remove all flags that have -lpod or frameworks or related to pods. Don't remove the required flags (e.g. -ObjC, -licucore, -libxml2)
  2. Add a flag $(inherited) at the top.
  3. Clean the project and compile.
Ourang-Zeb Khan

I had the same error while migrating my project to iOS 9. I solved it by doing this:

  1. Navigate to the Build Settings tab for your project and search for "link".
  2. In the the Other Linker Flags section, remove -l"Pods-AFNetworking" and replace it with -l"AFNetworking"

See the screenshot linked here for more information:

http://i.stack.imgur.com/uG51T.png

LoveMeow

I wanted to write an answer myself because two things together worked :

  1. AS @Helium3 mentioned, I had to open the workspace rather than the project file in the file explorer(projectname.xcworkspace file)(I actually have 2 and only 1 seems to work!)

  2. As @Muhammad Adnan mentioned in the comments, what worked was to install pod and update pod it solved the linker problems!!(Note: This should be done in the project directory,make sure cocoapods are installed first!!), in addition it gave me odd errors at first(after a second go),later it was alright!

Thank you guys!

It has been a while since this question but today I ran into a similar issue and how we solved it was by going to: Edit Scheme > Build

and making sure the option ´Find Implicit Dependencies´ is checked.

I had it unchecked and after I updated CocoaPods to 1.0, I couldn´t find the dependencies in the Derived Data folder.

After that I could build it succesfully.

In iWatch App using Cocoa Pods AFNetworking i got the Same issue.

I Just Solved Issue ....

Just Follow this Step.

[1] Open your project's podfile by typing in terminal:

open -a Xcode Podfile

Check If you are Using AFNetworking than using

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

pod 'AFNetworking', '~> 3.0'

copy and paste this between target 'iChat' do .... end

Like .....

target 'iChat' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for iChat

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

pod 'AFNetworking', '~> 3.0'

end

and

[2] Then open your terminal again simply paste it.

pod install

Now open App.xcworkspace and Clear and Run You can see Error is Gone Now...

React native:

I forgot to install a new RN module after pulling changes. So don't forget to npm i or yarn before building with react-native.

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