Cocoapods Framework with Dependencies - Include of Non-Modular Header Inside Framework Module

“Include of non-modular header inside framework module” while compiling pod

You should add the flag --use-libraries like this:

pod repo push myCocoapodsRepo myPodspec.podspec --allow-warnings --verbose --use-libraries

Flutter: include of non-modular header inside framework module 'firebase_core.FLTFirebasePlugin'

What worked eventually:

  1. Put all the pubspec.yaml dependencies to the latest version.
  2. Delete pubspec.lock, Pods folder in ios and Podfile.lock
  3. Run flutter clean -> flutter pub get -> cd ios -> pod install -> cd .. -> flutter run

And you should be good to go

Include of non-modular header inside framework error

I was able to reproduce your error. I looks like the WindowsAzureMessaging header and all other headers it refers are not made to be used in a modular framework umbrella header, because it uses "user" imports instead of "system" imports relative to the framework, and also it doesn't have the modulemap file.

You have several options:

  1. adapt their code and make it build as a module (make it "modular").
  2. not include it in the umbrella header (avoid referencing things from it there), but link it and use directly in the app and your framework.
  3. instead of using the file framework as a separate entity, you could take (copy) their source code (m and h files) and compile into your framework, and then expose some headers as your own headers.

I think that option 1 is the right way to go. It is not hard, and if you manage to do that, think about making a pull request for their repo, because this is going to benefit everyone.



Related Topics



Leave a reply



Submit