How to fix "Lexical or Preprocessor Issue (Xcode): 'PigeonParser.h' file not found"

171 views Asked by At

i'm not sure if this is a brand new error with Firebase, because I saw some ppl reported this on Github, the problem is i can't build the app at all and every time i got this error message "Lexical or Preprocessor Issue (Xcode): 'PigeonParser.h' file not found"

I tried all possible solutions such as clean and -rm .. etc, and also i've changed the firebase version for auth, messages, firestore .. etc but still same issue

  firebase_core: ^2.18.0
  firebase_crashlytics: ^3.4.0
  firebase_auth: ^4.11.0
  cloud_firestore: ^4.10.0
  firebase_storage: ^11.3.0
  firebase_messaging: ^14.7.0

Android Studio Error

enter image description here

Btw, i'm using iMac M1, and xCode 15, also have iMac Intel and xCode 14 + 15 both installed, and still same issue!

Any suggestions please?

1

There are 1 answers

0
Ahmed AlNeaimy On BEST ANSWER

I Fixed it!

1- open xCode 15 and go to Runner -> Targets -> Select your Target -> Build Phases

Then, move the Embed App Extensions, Embed Frameworks, and Embed Pods Frameworks to be performed before the Run Script build phase

enter image description here

2- Make sure to update Cocoapods to latest version

brew upgrade cocoapods

3- Clean your Flutter project

flutter clean

4- click pub get button or use command

flutter pub get

Now build your app again and it should work!