9

Spent an hour trying to debug this error with stack overflow and GitHub. Any help appreciated. I tried the deleting iOS file and doing flutter clean and stuff.

Error (Xcode): 'Flutter/Flutter.h' file not found /Users/ME/Desktop/fitnessapp/ios/Runner/GeneratedPluginRegistrant.h:9:8 Error (Xcode): failed to emit precompiled header '/Users/ME/Library/Developer/Xcode/DerivedData/Runner-gzhzlsjpfyzcnebymqrpzjndrlbm/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift _10LJ9PKPTMFQI-clang_1OUD1W5Q54EHI.pch' for bridging header'/Users/ME/Desktop/fitnessapp/ios/Runner/Runner-Bridging-Header.h' Could not build the application for the simulator. Error launching application on iPhone 13 Pro. 
1
  • have you got the fix? Commented Sep 22, 2023 at 12:29

4 Answers 4

26

You could try to do this:

  1. Backup Runner folder
  2. Delete the ios folder
  3. Go to a terminal and execute flutter create . in the flutter project folder
  4. Paste your Runner folder back into the ios folder
  5. pod deintegrate in the ios folder
  6. pod install also in the ios folder
  7. flutter clean in the flutter project folder
  8. flutter pub get
  9. flutter run

Please note that if you use firebase you need to re-insert the GoogleService-Info.plist file

Hope it helps, but if it still does not make sure you are in stable channel

Sign up to request clarification or add additional context in comments.

7 Comments

This worked! I saw this answer in many different stackoverlfow pages and tried it like a million times. The thing I did different was to switch to the stable channel this time. Thank you!
Glad it helped!
works fine but i think i lost my notification settings
To be more precise, GoogleService-Info.plist file needs to be re-added to the files in Xcode.
Finally! I tried several things. Initially the flutter create . did not provide the new iOS folder, however, after tweaking several other things it finally worked as described. Thanks!
|
18

After trying Edin's solution it still didn't work for me!

Make sure that for install builds only box is unchecked

for install builds only is unchecked

3 Comments

works as well! I tried lots of things, but I wasted my time with them, but for my problem this was the solution, thx
I had the same problem, This workaround has fixed it. Thanks
It worked. However the same issue reappeared when I archive the build for releasing in Test Flight. Any solution for this?
1

i fixed the same problem like this by removing the SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h" in buildSettings of Extension

https://github.com/AngeloAvv/flutter_flavorizr/issues/197

1 Comment

This is the only thing that worked for me (or I think so -- at least it moved me to a new error). Now I have another issue though: the new error is Swift Compiler Error (Xcode): No such module 'Flutter'
0

Running pod install in the ios folder worked for me.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.