10

After updating to the latest Xcode to support ios12 I can't build my project It seems that none of the pods are being compiled. I'm getting an error for unknown import such as "file not found" (ex 'SDWebImage/UIImageView+WebCache.h' file not found)

(if I comment everything related to this, it's just showing an error for the next package that does not exist)

for plugins installed from pod.

if I add the pod scheme and compile it, and then compile my project all the imports are working fine but then I get this compiler error for every package:

Showing Recent Messages

:-1: ignoring file 
/Users/administrator/Library/Developer/Xcode/DerivedData/XXXProject- 
ajmnddfiwycmqihdrqgzcltbrovs/Build/Products/Debug- 
iphonesimulator/Pods_XXXProject.framework/Pods_XXXProject, file was 
built for archive which is not the architecture being linked (i386): 
/Users/administrator/Library/Developer/Xcode/DerivedData/XXXProject- 
ajmnddfiwycmqihdrqgzcltbrovs/Build/Products/Debug- 
iphonesimulator/Pods_XXXProject.framework/Pods_XXXProject

My pod file is very simple, my projects have 3 extensions It worked fine before the update.

I've tried removing, installing few times, updated my pod to 1.5.3 Nothing seems to work. (tried even with the pod beta version 1.6)

Tried both Legacy and New System build getting same error for both.

In the project build phases, everything seems fine and should be copied. (using use_frameworks!)

This is how my podfile looks like

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

target ‘XXXXX’ do
    pod 'GoogleAnalytics'
    pod 'Firebase/Core'
    pod 'Firebase/Messaging'
    pod 'FBAudienceNetwork'
    pod 'FBSDKLoginKit'
    pod 'Fabric', '~> 1.7.6'
    pod 'Crashlytics', '~> 3.10.1'
    pod 'AccountKit'
    pod 'SDWebImage', '~> 4.0'
    pod 'BEMCheckBox'
end

Any ideas what's wrong?

yogkm
  • 649
  • 5
  • 15
itay83
  • 410
  • 1
  • 6
  • 18
  • Please check here... [click](https://stackoverflow.com/questions/52364895/xcode-10-gm-multiple-command-produce-pods-issues/52366773#52366773) – Pratik Sodha Sep 18 '18 at 10:51
  • 1
    Hi, cocapods are installed the current version I'm running is 1.5.3 (pod --version works, pod install, update works) tried cleaning, removing, installing few times didn't help – itay83 Sep 18 '18 at 10:53

4 Answers4

22

This is the problem of your previous cache store in the derived data folder.

Go to the DerivedData folder. Close XCode. Delete your apps from DerivedData folder. Reopen XCode, clean project and run again.

XCode preference > Locations > Derived Data (click right side icon in the directory path, it will open DerivedData folder)

Select your pod from the left project navigator. > Select Target. > Select "Build Settings". > Build Active Architecture Only to No

Supran Jowti
  • 371
  • 2
  • 9
  • Hi thanks for the suggestion, I forgot to mention that I did that already few times Even deleted the whole folder and the Xcode recreated it Deleted the folder -> deleted all pod references including (pod folder and xcworkspace file) run fresh pod install, open xcworkspace project file Still the same – itay83 Sep 18 '18 at 12:11
  • 5
    Select your pod from the left project navigator. > Select Target. > Select "Build Settings". > Build Active Architecture Only to No. – Supran Jowti Sep 18 '18 at 12:29
  • 2
    Lifesaver! how did I miss that! works like a charm now :) Thank you! (put it in your answer I'll mark as Answer) – itay83 Sep 18 '18 at 12:33
  • 3
    The part `Select Pod Target. > Select "Build Settings". > Build Active Architecture Only to No ` works fine for me. – Olympiloutre Nov 30 '18 at 14:57
  • Thanks Bro, send your address, I will give you Party, you saved my time – Ravi Jun 06 '19 at 19:47
  • Thanks man! I've been struggling almost 20 hours until I found your answer. I invite you a fine wine if you came here to Argentina sometime. – Agustin Meriles Oct 30 '19 at 18:20
  • Funny, mine starts working when I changed the "Build Active Architecture Only" to "Yes"! – Farhad Malekpour Nov 23 '19 at 11:48
8

Here is another case: make sure "Scheme" > "Build" > "Find Implicit Dependencies" is turned on.

I turned it off (tried to fix another problem) and spent quite some time trying to fix the build.

Anton
  • 726
  • 11
  • 23
2

In my case

pod deintegrate
pod clean
pod install

then rebuild the project works.

My XCode = 11.3.1

Gander
  • 1,854
  • 1
  • 23
  • 30
Mahfuz
  • 63
  • 6
0

I had the same problem with Xcode 10 and newly added pods.

I've noticed new pod was not added to Target -> Build Phases -> Link Binary With Libraries. When I added new pod-framework manually, archiving worked ok.

sabiland
  • 2,526
  • 1
  • 25
  • 24
  • I see the pods_. framework icon blurred by the white overlay. This implies the pods framework is not added. How can i resolve this? – Jeff Bootsholz Sep 16 '20 at 17:51