Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
heitor598 opened this issue Dec 27, 2024 · 2 comments

Comments

@heitor598
Copy link

Problem description:
When trying to create the iOS app, I get the following error:

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 'clevertap_plugin.CleverTapPluginAppFunctionPresenter': '/Users/alloyal-dev/Documents/Projects/lecupon-flutter/build/ios/Debug-iphoneos/CleverTap-iOS-SDK/CleverTapSDK.framework/Headers/CTTemplatePresenter.h'
/Users/alloyal-dev/.pub-cache/hosted/pub.dev/clevertap_plugin-3.0.0/ios/Classes/CleverTapPluginAppFunctionPresenter.h:2:8

Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'clevertap_plugin.CleverTapPluginTemplatePresenter': '/Users/alloyal-dev/Documents/Projects/lecupon-flutter/build/ios/Debug-iphoneos/CleverTap-iOS-SDK/CleverTapSDK.framework/Headers/CTTemplatePresenter.h'
/Users/alloyal-dev/.pub-cache/hosted/pub.dev/clevertap_plugin-3.0.0/ios/Classes/CleverTapPluginTemplatePresenter.h:8:8

Captura de Tela 2024-12-27 às 17 18 59

Expected behavior:
The application must be run on a physical device.

@kushCT
Copy link
Contributor

kushCT commented Dec 27, 2024

Hello @heitor598
Thanks for reporting this out. Just wanted to update about this, we have a fix but the update is still not released, should be fixed in upcoming release.

Xcode setting has been changed with the latest version of xcode, maybe apple is moving away from supporting the include of non-modular header inside framework modules. For now at least, referencing the xcode docs, if you add CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES set to YES as a User-Defined Build Setting you will be able to continue debugging.

Steps to solve

  1. select the runner
  2. go to build settings
  3. scroll down to Apple Clang - Language - Modules
  4. change the Allow Non-modular includes in Framework Modules to "Yes" (by default this is set to "No" now)
    341949879-9542f1b6-60b5-4b34-b027-1fa15c01657f

@heitor598
Copy link
Author

Thanks for the information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants