Include of non-modular header inside framework module 'firebase_storage.FLTTaskStateChannelStreamHandler'
Asked Answered
S

3

5

When debugging for iOS with Flutter, the following error occurs during build.

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'firebase_storage.FLTTaskStateChannelStreamHandler': '/Users/User1/FlutterProjects/flutter_project/ios/Pods/Headers/Public/Firebase/Firebase.h' /Users/User1/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/ios/Classes/FLTTaskStateChannelStreamHandler.h:12:8

env

Xcode 16, iOS Simulator 17.5 and 18.0

Flutter 3.24.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4cf269e36d (2 weeks ago) • 2024-09-03 14:30:00 -0700
Engine • revision a6bd3f1de1
Tools • Dart 3.5.2 • DevTools 2.37.2
Statampere answered 18/9 at 7:28 Comment(0)
L
13

This came from an answer already posted, but there was a part missing in the GitHub issue I didn't get at first.

To fix this you need to Open Xcode and set Allow non-modular Includes In Framework Modules to Yes.

Xcode setting to change

You can do this by:

  • Opening up the ios folder of your app in Xcode
  • Click on Runner > Then click on Build Settings
  • Make sure All is selected in the filter bar
  • Search for Allow to find the setting to toggle to Yes

This cleared up the issue and my app was able to be built and launch on the simulator.

Lennielenno answered 19/9 at 0:42 Comment(0)
T
3

For me the following solution solved the problem:

xCode -> Build Settings under Target ->

Search for:

Allow Non-modular Includes in Framework Modules

set to YES

I found the solution here: Reference

Tranche answered 19/9 at 11:35 Comment(0)
O
2

Xcode 16

need to set Allow non-modular Includes In Framework Modules to Yes.

Apple are really trying to hide this option, but I found it -

enter image description here

Ormandy answered 26/9 at 14:16 Comment(2)
It's like a peanut that fell between the couchesStatampere
This is it on Xcode 16Ballade

© 2022 - 2024 — McMap. All rights reserved.