Cocoa Pods Error ld: library not found for -lPods

I am getting an error from cocoa pods that I have never seen before. I had a lot of work with several dependencies. I recently added TestFlightSDK as a dependency through containers, and I cannot archive the project. It is great for devices, but refuses to archive. Has anyone else experienced this issue?

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

My library search paths are as follows (for debugging and release):

 $(SRCROOT) recursive $(PODS_ROOT) recursive $(inherited) recursive 
+7
ios cocoa cocoapods
source share
6 answers

Ok, so I found the answer (which worked for me) using some suggestions from this post

I really received another warning that I did not notice.

 Pods was rejected as an implicit dependency for 'libPods.a' because its architectures 'armv7 armv7s' didn't contain all required architectures 'armv7 armv7s arm64' 

In fact, this was due to the fact that the Pods target does not have the correct architectures. In the end, it turned out to be xCode error. For my Pods goal, I had all the correct architectures selected, armv7, armv7s and arm64.

DECISION:

  • Update cocoapods to the latest version supporting 64 arch.

     sudo gem update cocoapods 
  • Remove all valid architectures and clean up the project (which is not much.)

  • Re-add the architectures you just removed and voilà!
+13
source share

my mistake was old cocoa pods integration. I had to delete the pod- .a files in the "/ Frameworks" folder and the pod - .xcconfig files in the / Pods folder.

-> run 'pod install'

all perfectly

+1
source share

Another solution - if you update your containers with a new target, you check libpods.a, it may have been deleted, but the system could not find it. Make sure libpods is in your Linked Framework and libraries in the general information (where you change version, package ID and build).

0
source share

In my case, the problem was with Scheme.

  • go to Product → Scheme → Edit Scheme
  • click "Create"
  • add the static Pods library and make sure it is at the top of the list
  • clean and build again
0
source share

Choose your target, go to "Build Phases" in the "Link Binary With Libraries" ".a" files "Link Binary With Libraries" delete the ".a" file of this library. Clean and build.

0
source share

You can fix this problem if it belongs to the libraries by selecting your target, then going to "Build Phases" in the "Link Binary With Libraries" ".a" "Link Binary With Libraries" files and deleting the ".a" file of this library. After that, Cleanse and Build.

Hope this helps.

0
source share

All Articles