amoLink / bluetooth_print_plus

A flutter plugin for bluetooth thermal printer support Android & iOS
MIT License
12 stars 4 forks source link

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module #21

Closed MalinthaSamarasinghe closed 2 weeks ago

MalinthaSamarasinghe commented 1 month ago

I am encountering an issue when building my Flutter application for iOS using the bluetooth_print_plus library (version: ^2.2.0) on iOS Build Version 16. The library works fine on Android, but I receive the following error when compiling for iOS:

** Build Error ***** Running Xcode build... Xcode build done. 46.8s 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 'bluetooth_print_plus.BluetoothPrintPlusPlugin': '/Users/.../Desktop/store/...-app-2.0/ios/Pods/Headers/Public/GSDK/BLEConnecter.h' /Users/.../.pub-cache/hosted/pub.dev/bluetooth_print_plus-2.2.0/ios/Classes/BluetoothPrintPlusPlugin.h:2:8

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'bluetooth_print_plus.ConnecterManager': '/Users/.../Desktop/store/...-app-2.0/ios/Pods/Headers/Public/GSDK/BLEConnecter.h' /Users/.../.pub-cache/hosted/pub.dev/bluetooth_print_plus-2.2.0/ios/Classes/ConnecterManager.h:9:8

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'bluetooth_print_plus.ConnecterManager': '/Users/.../Desktop/store/...-app-2.0/ios/Pods/Headers/Public/GSDK/EthernetConnecter.h' /Users/.../.pub-cache/hosted/pub.dev/bluetooth_print_plus-2.2.0/ios/Classes/ConnecterManager.h:10:8

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'bluetooth_print_plus.ConnecterManager': '/Users/.../Desktop/store/...-app-2.0/ios/Pods/Headers/Public/GSDK/Connecter.h' /Users/.../.pub-cache/hosted/pub.dev/bluetooth_print_plus-2.2.0/ios/Classes/ConnecterManager.h:11:8

Parse Issue (Xcode): Could not build module 'bluetooth_print_plus' /Users/.../Desktop/store/...-app-2.0/ios/Runner/GeneratedPluginRegistrant.m:9:8

I have tried the following steps to resolve the issue without success:

  1. flutter clean
  2. flutter pub get
  3. flutter pub upgrade
  4. Clean iOS build project
  5. Delete Podfile.lock
  6. Run pod repo update
  7. Run pod install
  8. Run pod update
  9. Open the project with Runner.xcworkspace

Could you please advise on what might be causing this issue and how to fix it?

Thank you!

amoLink commented 1 month ago

refer to: https://stackoverflow.com/questions/27776497/include-of-non-modular-header-inside-framework-module