`fatal error: 'Flutter/Flutter.h' file not found` since Xcode 26 update
Ever since some Xcode update 2 days ago, my Share Extension won't compile anymore. Here's the log:
Swift Compiler Error (Xcode): Clang dependency scanner failure: While building module 'receive_sharing_intent' imported from receive_sharing_intent-cc13ccc6.input:1:
In file included from <module-includes>:1:
In file included from
~/Library/Developer/Xcode/DerivedData/Runner-akwfooptcthmhsenhzurarpfousn/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/receive_
sharing_intent/receive_sharing_intent.framework/Headers/receive_sharing_intent-umbrella.h:13:
~/Library/Developer/Xcode/DerivedData/Runner-akwfooptcthmhsenhzurarpfousn/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/receive_
sharing_intent/receive_sharing_intent.framework/Headers/ReceiveSharingIntentPlugin.h:1:9: fatal error: 'Flutter/Flutter.h' file not found
receive_sharing_intent-cc13ccc6.input:1:1: fatal error: could not build module 'receive_sharing_intent'
I've tried everything I could find on the internet, removing Podfile.lock, running pod install again, changing this and that setting in Xcode... Trying to build it on another Mac, going back in my git history... I went as far as deleting the whole ios folder and recreating both the main project and the Share Extension. Same issue.
Has anyone else encountered the same issue?
Ok so I ended up trying different forks of that project on pub.dev, since they say that this one has been abandoned. Most of the forks that have not diverged much produce the same error. However, after migrating to https://pub.dev/packages/share_handler, my iOS app compiles again, and sharing works!
I encountered the same problem, but unfortunately I cannot replace this library. Is there any way to solve this issue?
I found the solution:
- Open the
Runnerproject withXcode 26 - Follow the operations in the following screenshot to set
Explicitly Built ModulestoNO
This can be compiled, but I'm not sure of the specific function of this option, or what other issues it might cause; everyone can provide feedback to a wider audience.
I found the solution:
- Open the
Runnerproject withXcode 26- Follow the operations in the following screenshot to set
Explicitly Built ModulestoNOThis can be compiled, but I'm not sure of the specific function of this option, or what other issues it might cause; everyone can provide feedback to a wider audience.
For me that works fine. I use the package for all types of sharing. URL, Images, File
doesnt fix it for me
I found the solution:
- Open the
Runnerproject withXcode 26- Follow the operations in the following screenshot to set
Explicitly Built ModulestoNOThis can be compiled, but I'm not sure of the specific function of this option, or what other issues it might cause; everyone can provide feedback to a wider audience.
worked for me but we will switch to a more stable and not abandoned plugin.
This saved me a loooot of time :)
I found the solution:
- Open the
Runnerproject withXcode 26- Follow the operations in the following screenshot to set
Explicitly Built ModulestoNOThis can be compiled, but I'm not sure of the specific function of this option, or what other issues it might cause; everyone can provide feedback to a wider audience.
seemed to resolve the build issue locally but the app does not open when using the actual share extension. looks like the device wants to do something on app tap, but does not navigate to the app with the shared url. Could just be something else on my end, unsure
Update, seems to be working again. the CUSTOM_GROUP_ID build setting got cleared in xcode.
Jk. only working on simulator. Not real device
Jk, Jk. Only working on ios 18 simulator. Does not work w/ ios 26 simulator or real device.
after this fix there is a new crash about layout constraint...if i bypass this app won't open
I found the solution:
- Open the
Runnerproject withXcode 26- Follow the operations in the following screenshot to set
Explicitly Built ModulestoNOThis can be compiled, but I'm not sure of the specific function of this option, or what other issues it might cause; everyone can provide feedback to a wider audience.
seemed to resolve the build issue locally but the app does not open when using the actual share extension. looks like the device wants to do something on app tap, but does not navigate to the app with the shared url. Could just be something else on my end, unsure
Update, seems to be working again. the
CUSTOM_GROUP_IDbuild setting got cleared in xcode. Jk. only working on simulator. Not real device Jk, Jk. Only working on ios 18 simulator. Does not work w/ ios 26 simulator or real device.
Yep, the share extension stopped working altogether for my app since I made the change. Can't even open a share sheet from inside the app either.
Does anyone have any other solutions?
Ok so I ended up trying different forks of that project on pub.dev, since they say that this one has been abandoned. Most of the forks that have not diverged much produce the same error. However, after migrating to https://pub.dev/packages/share_handler, my iOS app compiles again, and sharing works!
After trying this method, it's finally working. It required a bit of configuration fixes and code changes BUT alas, it works perfectly now and with a more up-to-date package. Thanks!
@zhponng Thanks! This fixed my problem!
I found the solution:
- Open the
Runnerproject withXcode 26- Follow the operations in the following screenshot to set
Explicitly Built ModulestoNOThis can be compiled, but I'm not sure of the specific function of this option, or what other issues it might cause; everyone can provide feedback to a wider audience.
thanks bro
This can be compiled, but I'm not sure of the specific function of this option, or what other issues it might cause; everyone can provide feedback to a wider audience.
This can be compiled, but I'm not sure of the specific function of this option, or what other issues it might cause; everyone can provide feedback to a wider audience.
This can be compiled, but I'm not sure of the specific function of this option, or what other issues it might cause; everyone can provide feedback to a wider audience.
This can be compiled, but I'm not sure of the specific function of this option, or what other issues it might cause; everyone can provide feedback to a wider audience.