skip to Main Content

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

2

Answers


  1. This helped me to solve it, I hope it helps you too.
    #12962

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search