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

iOS build "non-modular header inside framework" error #90

Open
AndrejStarusev opened this issue Jul 6, 2020 · 6 comments
Open

iOS build "non-modular header inside framework" error #90

AndrejStarusev opened this issue Jul 6, 2020 · 6 comments

Comments

@AndrejStarusev
Copy link

AndrejStarusev commented Jul 6, 2020

I'm working on developing a mobile app with angular/ionic and capacitor. After I added zip plugin, the app is no longer building iOS.

I'm getting an error /Users/andrew/Documents/projects/casino-wallet/ios/capacitor-cordova-ios-plugins/sources/CordovaPluginZip/hmac.h:38:10: error: include of non-modular header inside framework module 'CordovaPlugins.hmac': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/memory.h'.

Xcode Version 11.4 (11E146)
Plugin version ^3.1.0

Maybe I have to use some specific swift version? Any suggestions are appreciated.

Example of usage:
import { Zip } from '@ionic-native/zip/ngx';
constructor(private zip: Zip){}
const unzipResult = await this.zip.unzip( zipUrl, this.storagePath, progress => { console.log('___p', progress); } );

@deveshmishra34
Copy link

Hi @AndrejStarusev i'm getting the same error, Have you found any solution yet..?

@mobigaurav
Copy link

I am am also seeing error with plugin:

/Users/gauravkumar/Desktop/pproject/ionic/mantra-migration/ios/capacitor-cordova-ios-plugins/sources/CordovaPluginZip/hmac.h:38:10: error: include of non-modular header inside framework module 'CordovaPlugins.hmac': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/memory.h'
#include <memory.h>

@ludufre
Copy link

ludufre commented Nov 1, 2021

@AndrejStarusev did you solved this?

@ravi155
Copy link

ravi155 commented Nov 25, 2021

@mobigaurav I have exactly same thing. Did you resolve this?

@ravi155
Copy link

ravi155 commented Nov 25, 2021

I found solution for this:

build setting -> set OTHER_SWIFT_FLAGS to -Xcc -Wno-error=non-modular-include-in-framework-module.

Note: The main project using this framework also needs to set OTHER_SWIFT_FLAGS

Allow Non-modular Includes in Framework Modules only work in objc code. not work in swift.

@foreinger
Copy link

adding this piece of code to the podfile ended my suffering with this issue

post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
        config.build_settings['OTHER_SWIFT_FLAGS'] ||= ['$(inherited)', '-Xcc', '-Wno-error=non-modular-include-in-framework-module']
    end
end

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

6 participants