29

Target 'AAA-Pods' for project 'Pods' was rejected as an implicit dependency for 'Pods_AAA.framework' because its architectures 'x86_64' didn't contain all required architectures 'i386 x86_64'.

This appears as warning, then linker error appears.

Arshin
  • 1,050
  • 1
  • 9
  • 10
  • This warning is also showing in Xcode 9.3 but maybe it is due to, my project code was created with old Xcode version. – Pramod More Jun 08 '18 at 05:15

6 Answers6

64

Possible Solution:

  1. Open Xcode project (cocoapods project) using .xc... file.
  2. Select Pods project in the project navigator (blue icon on left).
  3. Under Project, ensure Pods (blue icon) is selected.
  4. Navigate to Build Settings.
  5. Set Build Active Architectures Only = No (for both debug & release).
  6. Optional: set base sdk to latest iOS (or select the preferred platform/version).

Note: This solution resolved this issue (warning and linker error) for me.

Suggested resources:

Github Project: https://github.com/CocoaPods/CocoaPods/issues/2053 Github Pull Request: https://github.com/CocoaPods/CocoaPods/pull/1352

Arshin
  • 1,050
  • 1
  • 9
  • 10
29

For future Googlers: 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.

Benjamin Schmidt
  • 1,051
  • 13
  • 29
8

On a very new project on Xcode 9.4.1, the issue was that my Podfile's deployment target was set to platform :ios, '11.0' while my project's iOS deployment target was set to 10.3.

This caused the generated Pods project to target iOS 11.0 (supported by only 64-bit devices on arm64 architecture), but since my main project targets 10.3 and includes armv7 devices, this doesn't work when archiving a Release build since a Release build also builds nonactive architectures by nature (unless you only support iOS 11 devices).

The fix then is to simply change the Podfile's deployment target to match your main project's, in my case it's platform :ios, '10.3'. Afterwards, run pod update and the Pods project should be regenerated. Launch Xcode, perform a clean and you should be able to run the archive process.

Chee-Yi
  • 880
  • 10
  • 17
1

I realize this question is a little old, however I spent 2 days fighting the same issue right after XCode updated to 9.4. What I found was in the info.plist under the key required device capabilities armv7 was set when it should have been blank. Hope this helps someone.

Mark Dail
  • 501
  • 4
  • 10
  • 1
    Note: the valid Architectures in the build settings of both the project and the Pod project need to match with armv7, armv7s and arm64 – Mark Dail Jun 05 '18 at 19:25
1

I had the same issue recently after migrating to Xcode 10.1.

Building with Debug config was working just fine, however archiving with Release config was generating this warning. And then archiving would fail, because in the main project all the module imports referring to Pods were failing.

Checking the Build Settings for the Project I realised that iOS Deployment Target was showing a different value for my Release config. iOS 10.0, while my Podfile was set to platform :ios, '11.0'.

enter image description here

Romano
  • 320
  • 3
  • 5
0

Another solution which works for me.

  1. Open up .xcodeproject (not .xcodeworkspace)
  2. Find IOS Deployment Target
  3. Choose the latest version you have(My latest version is 11.4)
Jeff
  • 1