Jim Peters
Jim Peters

Reputation: 331

xCode 12 Beta 4, Lexical or Preprocessor issue - header file not found. Simulator only - works on device

macOS Catalina 10.15.5. xCode 11.6, xCode 12 beta 4. Objective-c app with 7 cocoapods. The app runs fine in xCode 11 and in xCode 12 on device. It fails to compile in xCode 12 simulator with Lexical or Preprocessor issue on the first cocoapod it encounters. If I eliminate that one it fails on the next. I've tried the standard steps - clean build folder, restart xCode, delete pod files and reinstall, pod repo update, clean derived data, etc. This was also an issue in beta 3.

Any ideas?

Upvotes: 5

Views: 2844

Answers (3)

LochNessMonster
LochNessMonster

Reputation: 441

I started getting this error with a project when building it with Xcode 12.5 Beta3 for the first time when it was working previously with Xcode 12.4. The error was occurred during the build process when it encountered the Firebase packages that I had installed via the Swift Package Manager (not Cocoapods).

The simple solution for me was to just update the packages to the latest versions via File -> Swift Packages -> Update to Latest Package Versions.

Upvotes: 0

LQi2009
LQi2009

Reputation: 11

you can try: add "x86_64" at "TARGETS ->Build Settings -> User-Defined -> VALID_ARCHS", and it's works too.

Upvotes: 1

Shikhil
Shikhil

Reputation: 61

Try upgrading the Project Xcode compatibility to Xcode 11 and change the VALID_ARCHS to $(ARCHS_STANDARD). It worked for me

Upvotes: 6

Related Questions