Podspec dependency does not define modules

873 views
Skip to first unread message

simmons...@oscogroup.com

unread,
Oct 5, 2020, 8:02:00 AM10/5/20
to CocoaPods
Hey all,

So it's my first time trying to write my own Cocoapods library and using a .podspec.
Is it possible to include other Cocoapods as dependencies? I am trying to include MaterialComponents as a dependency in my .podspec like this:

       spec.dependency "MaterialComponents", "~> 113.0.0"

But I get the following error and am not sure how to resolve it:

$pod lib lint --use-libraries
  -> CommonIos (0.0.1)
      - ERROR | [iOS] unknown: Encountered an unknown error (The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `CommonIos` depends upon `MaterialComponents`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.) during validation.


I am not sure where to add `use_modular_headers!` into my podspec. Is it even possible to include MaterialComponents as a dependency? Any help with this would be great.

Thanks,
       Beckett

playtom...@gmail.com

unread,
Oct 10, 2020, 6:39:45 AM10/10/20
to CocoaPods

update you cocoapods  and  run `pod lib lint --allow-warnings`, Don't add --use-libraries
Reply all
Reply to author
Forward
0 new messages