Search code examples
ioscocoapodsxcode10

Xcode 10, not building pods can't build project


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?


Solution

  • 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