another_brother icon indicating copy to clipboard operation
another_brother copied to clipboard

Build Errors on macOS due to non-modular header Includes on ios-no-type-b branch

Open ablause opened this issue 1 year ago • 4 comments

When building a Flutter project on a macOS device for an iphone device, the following build errors are encountered:

Could not build the precompiled application for the device.
Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'another_brother.BrotherManager': '/Users/username/Projects/your-flutter-app/ios/Pods/BRLMPrinterKit/BRLMPrinterKit/BRLMPrinterKit.framework/Headers/BRLMPrinterKit.h'
/Users/username/.pub-cache/git/another_brother-4df113188004959c3dacba35a990ba3a6c989887/ios/Classes/BrotherManager.h:11:8
BrotherManager.h:11

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'another_brother.BrotherUtils': '/Users/username/Projects/your-flutter-app/ios/Pods/BRLMPrinterKit/BRLMPrinterKit/BRLMPrinterKit.framework/Headers/BRLMPrinterKit.h'
/Users/username/.pub-cache/git/another_brother-4df113188004959c3dacba35a990ba3a6c989887/ios/Classes/Method/BrotherUtils.h:11:8
BrotherUtils.h:11

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'another_brother.BrotherUtils': '/Users/username/Projects/your-flutter-app/ios/Pods/BRLMPrinterKit/BRLMPrinterKit/BRLMPrinterKit.framework/Headers/BRLMPrinterDefine.h'
/Users/username/.pub-cache/git/another_brother-4df113188004959c3dacba35a990ba3a6c989887/ios/Classes/Method/BrotherUtils.h:12:8
BrotherUtils.h:12

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'another_brother.BrotherUtils': '/Users/username/Projects/your-flutter-app/ios/Pods/BRLMPrinterKit/BRLMPrinterKit/BRLMPrinterKit.framework/Headers/BRPtouchPrinterKit.h'
/Users/username/.pub-cache/git/another_brother-4df113188004959c3dacba35a990ba3a6c989887/ios/Classes/Method/BrotherUtils.h:13:8
BrotherUtils.h:13

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'another_brother.GetBluetoothPrintersMethodCall': '/Users/username/Projects/your-flutter-app/ios/Pods/BRLMPrinterKit/BRLMPrinterKit/BRLMPrinterKit.framework/Headers/BRPtouchPrinterKit.h'
/Users/username/.pub-cache/git/another_brother-4df113188004959c3dacba35a990ba3a6c989887/ios/Classes/Method/GetBluetoothPrintersMethodCall.h:11:8
GetBluetoothPrintersMethodCall.h:11

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'another_brother.GetNetPrintersMethodCall': '/Users/username/Projects/your-flutter-app/ios/Pods/BRLMPrinterKit/BRLMPrinterKit/BRLMPrinterKit.framework/Headers/BRPtouchPrinterKit.h'
/Users/username/.pub-cache/git/another_brother-4df113188004959c3dacba35a990ba3a6c989887/ios/Classes/Method/GetNetPrintersMethodCall.h:11:8
GetNetPrintersMethodCall.h:11

Environment:

  • Flutter version: 3.22.0
  • macOS version: 14.0 (m2)
  • Xcode version: 15.4
  • Dart version: 3.4.0

Additional Information: I tried to run the build with #52, but it doesn't change anything.

ablause avatar Jul 09 '24 13:07 ablause

Hi @ablause ,

Thanks for reaching out about this. From the error message it seems you might be missing one of the setup steps for iOS. The video may be found in the ReadMe but here is the link for convenience https://youtu.be/AcFnd-6hSew?si=UXa4bfDDmBLT7gIj&t=109

CodeMinion avatar Jul 09 '24 14:07 CodeMinion

Hello @CodeMinion,

The option to activate “Allow Non-modular Includes In Framework Modules” does not seem to exist. When I open either Runner.xcworkspace or Runner.xcodeproj and navigate to Runner > Build Settings > Apple Clang - Language - Modules, the setting is not available.

Could you help me with this, is there any other way?

Thank you for your assistance.

ablause avatar Jul 10 '24 08:07 ablause

Screenshot 2024-07-20 at 11 28 27 AM

SoCaliOS avatar Jul 20 '24 18:07 SoCaliOS

Thanks for sharing the screen shot @SoCaliOS !

@ablause , unfortunately I do not use xCode enough to be able to point you where the location of this toggle is in your current version. The version I used is the one captured in the video.

Hope the screenshot from @SoCaliOS is able to help, otherwise I recommend reaching out on an iOS specific channel for where to find it in your xCode version.

CodeMinion avatar Jul 21 '24 19:07 CodeMinion