MobileChromeApps / cordova-plugin-zip

Zip plugin for Cordova apps
Other
168 stars 206 forks source link

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

Open AndrejStarusev opened 4 years ago

AndrejStarusev commented 4 years ago

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 commented 3 years ago

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

mobigaurav commented 3 years ago

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

ludufre commented 2 years ago

@AndrejStarusev did you solved this?

ravi155 commented 2 years ago

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

ravi155 commented 2 years ago

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 commented 1 year ago

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