Flutter iOS build : 'GeneratedPluginRegistrant.h' file not found

Viewed 1265

I'm trying to do an iOS build of my flutter app.
It was originally developed as a web app, and that and the Android version build just fine.

I've needed to init the Podfile, and also add some variable to fix a "Sandbox is not in sync" issue.

Now I am facing the following error:

my-app/ios/Runner/Runner-Bridging-Header.h:1:9: 'GeneratedPluginRegistrant.h' file not found

Failed to emit precompiled header '/Users/me/Library/Developer/Xcode/DerivedData/Runner-bcjlnasdfassdfsdf/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift_1LNASLDFKSJDFRW-clang_10GAW6SLDFKJPY.pch' for bridging header '/Users/me/my-app/ios/Runner/Runner-Bridging-Header.h'

If I open the Runner/Runner-Bridging-Header.h file, these are the contents:

#import "GeneratedPluginRegistrant.h"

And there is indeed no file called "GeneratedPluginRegistrant.h" anywhere in my project.

Where do I get the GeneratedPluginRegistrant.h file from?
How do I fix this issue?


Update :

I am also seeing this error :

Could not build the precompiled application for the device.

It appears that your application still contains the default signing identifier. Try replacing 'com.example' with your signing id in Xcode: open ios/Runner.xcworkspace

Error launching application on iPhone.


Update :

Changing the signing ID results in the following :

Could not build the precompiled application for the device. Swift Compiler Error (Xcode): Cannot find 'GeneratedPluginRegistrant' in scope /Users/me/my-app/ios/Runner/AppDelegate.swift:9:4

1 Answers

GeneratedPluginRegistrant is generated automaticlly by flutter. I think you can do:

  1. clean the build folder of ios project
  2. flutter pub upgrade in flutter project
  3. pod update in ios folder (If you have some plugin) Then try again.
Related