47

A friend updated Cocoapods in our project. When I pulled the latest stuff from git I got the following error:

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

This results in

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

I have searched around for hours now trying to find it. The most common fixes I've tried are..

  • Deleted derived data
  • Delete build data
  • Delete pods, and reinstalled with 'pod install'
  • Clean project
  • All of the above at the same time
  • Experimented with 'Build Active Architecture Only', both in our project and in Pod Project. Inserted armv7 and armv7s as hard code instead of $ variable
  • Experimented with 'Architectures', both in our project and in Pod Project. Inserted armv7 and armv7s as hard code instead of $ variable

We are aiming for iOS 8, iPhones.

My friend got it to work by combining the first 4 options, but I cannot.

Does anyone have any suggestions? We're supposed to release before christmas so production time is precious :D

C-A
  • 699
  • 1
  • 6
  • 11

6 Answers6

125

Try to set Build Active Architecture Only to NO for 'Pods' project and your app's target

skywinder
  • 21,291
  • 15
  • 93
  • 123
ananas
  • 1,437
  • 1
  • 10
  • 12
  • 3
    What fixed this problem for me was precisely the opposite: "Build Active Architecture Only" set to "YES" both in main target and Pods target + Debug and Release – Catarino Mar 25 '18 at 16:07
4

For me, what worked was to change the CocoaPod project "Base SDK" to "Latest iOS".

Luis Ferro
  • 95
  • 2
1

Try to run the project first on an iPhone 4s in simulator and after that it should work.

Ruud Visser
  • 3,381
  • 2
  • 20
  • 19
1

What fixed this problem for me was precisely the opposite of the most voted answer:

"Build Active Architecture Only" set to "YES"

both in main target and Pods target + Debug and Release

Catarino
  • 233
  • 2
  • 8
0

In my case, it was because I had the "Build Active Architecture Only" parameter set to Yes for Debug mode. Changing it no No fixed it.

Andrew Smith
  • 2,919
  • 2
  • 22
  • 25
0

Also make sure that your podfile targets the same iOS version your project targets:

For example, if you're targeting iOS 10.0 in your Xcode project your podfile should include platform :ios, '10.0' at the top, too.

Per this solution, which was the problem in my case.

Aleksandar Vacić
  • 4,433
  • 35
  • 35