Using static libraries with CocoaPods 1.5 no such module at import

前端 未结 2 2014
遥遥无期
遥遥无期 2021-02-05 11:15

With CocoaPods 1.5 released I am trying to migrate from having 10-15 dynamic pods in my projects to having them as static libraries instead, with the goal of speeding up my app

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-05 11:37

    CocoaPods 1.5.0 introduced use_modular_headers! to still provide module support with static libraries. Details in the release notes.

    Alternatively you could change the modular imports in your sources to file imports.

    I'd also recommend trying out the CocoaPods 1.6.0 beta since it has several fixes for static/dynamic library and framework issues.

    2020 Update

    CocoaPods 1.9.0 introduced use_frameworks! :linkage => :static which will generate full frameworks with statically linked libraries and module map files. This is typically an even better approach than use_modular_headers!.

提交回复
热议问题