XCode Archive error in prefix header

206 Views Asked by At

I'm using GPUImage framework in my project and this is added to the projects target dependencies. This actually builds and runs fine. Problem occurred when i tried to archive the project for ipa file. the error shows 'could not build module 'Foundation' -inside the GPUImage-Prefix.pch.

#ifdef __OBJC__
#import <Foundation/Foundation.h>
#endif

Is it conflicting with import of the project's ProjectName-Prefix.pch ?

#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

I am keen to know how to solve this with ideal practice. I did weak-link the Core Video framework in my project settings as per the GPUImage guideline, but no use at all. Thanks in advance.

2

There are 2 best solutions below

1
On

i think you can delete /Users/USERNAME/Library/Developer/Xcode/DerivedData/ModuleCache then clean the project

0
On

I did next: pod deintegrate then removed anything that found for cocoapods and for broken module. Also i did renamed a target and removed unused schemes. Cleaned project and build folder. After this i did pod install. Opened the new .xcworkspace (new because changed name of the target). Thats worked for me.