3

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

Turkey
  • 346
  • 4
  • 16

2 Answers2

1

Be sure to include the Runner-Bridging-Header.h file in the "Objective-C Bridging Header" section in your project file in XCode as described here

https://github.com/flutter/flutter/issues/24869#issuecomment-461865955

stenlee
  • 11
  • 1
  • 2
0

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.
luckysmg
  • 187
  • 1
  • 9
  • Running this I do get the file "./example/ios/Runner/GeneratedPluginRegistrant.h" .. I've just updated the question to add more of the error message I was getting - something I previously thought was a red herring, but now makes more sense -- I'm going to look up adjusting the "signing id" now -- but please see my update to the question and let me know if you have more information. – Turkey Feb 23 '22 at 00:59
  • I think it has told you the solution:Try replacing 'com.example' with your signing id in Xcode – luckysmg Feb 23 '22 at 01:50
  • Use your own sign id,you can debug on the real device – luckysmg Feb 23 '22 at 01:50
  • Sorry - I should have updated the question with the result of making that change - I have done so now - I'm leaving the other steps in the question because I still suspect there must be something fundamental wrong - everything I do raises a new issue - perhaps there is something wrong from the start of the process. – Turkey Feb 23 '22 at 02:17
  • I'm facing the same issue did you find a solution? – Daan van der Plas Feb 17 '23 at 12:09