-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Is there an existing issue for this?
- I have searched the existing issues.
Which plugins are affected?
Messaging
Which platforms are affected?
iOS
Description
Describe the issue
When building a Flutter project for iOS using a combination of the latest Flutter Beta SDK, the latest FlutterFire plugins, and the new Xcode 26.0, the build consistently fails. The error is a Lexical or Preprocessor Issue: Include of non-modular header inside framework module
, specifically pointing to firebase_messaging.FLTFirebaseMessagingPlugin
.
This issue persists even after performing a complete and thorough reset of the development environment, including creating a new macOS user account, reinstalling all tools (Xcode, Flutter, CocoaPods, Homebrew), and regenerating the native project folders.
Expected behavior
The application should build and launch successfully on an iOS simulator or a physical device.
Actual behavior
The Xcode build fails with the following error:
Failed to build iOS app
Could not build the precompiled application for the device.
Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'firebase_messaging.FLTFirebaseMessagingPlugin': '/Users/jigoo/Developer/diastory/ios/Pods/Headers/Public/Firebase/Firebase.h'
/Users/jigoo/.pub-cache/hosted/pub.dev/firebase_messaging-15.1.0/ios/Classes/FLTFirebaseMessagingPlugin.h:11:8
Additional context
This does not appear to be a standard configuration issue. We have exhaustively tried every known solution, including but not limited to:
- Creating a brand new macOS user account.
- Reinstalling all development tools from scratch.
- Regenerating the native
ios
andandroid
folders withflutter create .
. - Trying all variations of
use_modular_headers!
in thePodfile
. - Manually forcing modular headers on each individual Firebase pod.
- Cleaning every possible cache (
flutter clean
,pod cache clean
, deletingDerivedData
, etc.). - Switching between Flutter's
stable
andbeta
channels.
The issue seems to be a fundamental incompatibility between the toolchain versions.
Reproducing the issue
Steps to reproduce
- Set up a clean macOS environment with Xcode 26.0 and the latest Flutter Beta channel SDK.
- Create a new Flutter project (
flutter create my_app
). - Add the latest versions of FlutterFire plugins to
pubspec.yaml
(includingfirebase_core
,firebase_auth
, andfirebase_messaging
). - Run
flutter pub get
. - Configure the
ios/Podfile
to useplatform :ios, '15.0'
. - Run
pod install
in theios
directory (this completes successfully). - Attempt to build the app for an iOS target (
flutter run
). The build will fail during the Xcode build phase.
Firebase Core version
3.1.1
Flutter Version
3.37.0
Relevant Log Output
Flutter dependencies
environment:
sdk: ">=3.9.0 <4.0.0"
dependencies:
flutter:
sdk: flutter
cloud_functions: ^5.0.1
provider: ^6.1.2
cached_network_image: ^3.3.1
permission_handler: ^11.3.1
cupertino_icons: ^1.0.8
google_mobile_ads: ^5.1.0
firebase_remote_config: ^5.0.1
url_launcher: ^6.3.0
shared_preferences: ^2.2.3
geolocator: ^12.0.0
geocoding: ^3.0.0
json_annotation: ^4.9.0
path_provider: ^2.1.3
image_picker: ^1.1.2
path: ^1.9.0
fl_chart: ^0.68.0
uuid: ^4.4.0
flutter_local_notifications: ^17.1.2
timezone: ^0.9.4
firebase_core:
firebase_messaging: 15.0.0
cloud_firestore: ^5.0.1
firebase_auth: ^5.1.1
firebase_storage: ^12.0.1
google_sign_in: ^6.2.1
sign_in_with_apple: ^6.1.1
font_awesome_flutter: ^10.7.0
share_plus: ^9.0.0
lottie: ^3.1.2
flutter_localizations:
sdk: flutter
intl: any
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^3.0.0
flutter_launcher_icons: ^0.13.1
build_runner: ^2.4.6
json_serializable: ^6.7.1
flutter_icons:
android: true
ios: true
image_path: "assets/icon/app_icon.png"
remove_alpha_ios: true
flutter:
generate: true
uses-material-design: true
assets:
- assets/
Additional context and comments
No response