'Flutter/Flutter.h' file not found on iOS build
Whenever I try to run an iOS build of my app that has the wakelock plus package, I always get this error. What can be done to fix this?
Same problem Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found /Users/x/.pub-cache/hosted/pub.dev/wakelock_plus-1.2.5/ios/Classes/messages.g.m:8:8
Same here.
Same here
Same here. I try add: flutter_additional_ios_build_settings(target) in the "post_install do", but have new bug rvm version
Issue: 'Flutter/Flutter.h' file not found during iOS build
Description:
I am encountering a Lexical or Preprocessor Issue when trying to build my iOS app that uses wakelock_plus. The error states that 'Flutter/Flutter.h' file not found.
Here is the output:
Running Xcode build...
Xcode build done. 13.1s
Failed to build iOS app
Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found /Users/ms/.pub-cache/hosted/pub.dev/wakelock_plus-1.2.8/ios/Classes/messages.g.m:8:8
Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found /Users/ms/.pub-cache/hosted/pub.dev/wakelock_plus-1.2.8/ios/Classes/WakelockPlusPlugin.h:0:8
Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found /Users/ms/.pub-cache/hosted/pub.dev/video_player_avfoundation-2.6.1/darwin/video_player_avfoundation /Sources/video_player_avfoundation/messages.g.m:11:8
Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found /Users/ms/.pub-cache/hosted/pub.dev/video_player_avfoundation-2.6.1/darwin/video_player_avfoundation /Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin.h:7:8
Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found /Users/ms/.pub-cache/hosted/pub.dev/video_player_avfoundation-2.6.1/darwin/video_player_avfoundation /Sources/video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h:9:8
Could not build the application for the simulator. Error launching application on iPhone 16 Pro Max.
@MercyOdunjo @falniak95 @dekapro9x @MustafaGaber @gokhanvaris I am getting the same error, is this issue resolved. Kindly update.
@sunilflutterwebcom I found that this issue is not actually a wakelock problem as shown in @qays3 's build error message. I have had this same error from different other packages on my app at different times. What works for me in recent times, even today, is to do:
flutter clean
flutter pub get
cd ios
pod update
And then run your app normally after the above steps. Sometimes you might have to delete the Podfile.lock file in your ios folder and rerun the steps if it doesn't work the first time. The Podfile.lock and NOT the Podfile itself.