Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 453
itay83 Avatar asked Sep 18 '18 10:09

itay83


People also ask

Why is my build failing on Xcode?

A common cause of failing builds is that Xcode Cloud can't access the Package. resolved file that it needs to resolve your Swift Package dependencies.


2 Answers

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.

like image 55
Anton Avatar answered Sep 22 '22 06:09

Anton


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

like image 25
Supran Jowti Avatar answered Sep 21 '22 06:09

Supran Jowti