Search code examples
iosswiftcocoapods

When I package use_frameworks, the package gets bigger. Why?


  • cocoapods Version: 1.8.4
  • iOS Version: 13.1
  • Xcode Version: 11.3.1
  • swift Version: 5.0.1

The packages get larger when I use use_frameworks packages, and when I look at the contents of the packages I find that there are more packages corresponding to xx.frameworks.dsyms in the dSYMs folder

  • q1: what happened here?

  • q2: should I use use_frameworks without considering blending?


Solution

  • The use_frameworks causes your pods to be built into dynamic frameworks, which take more space than static linking.

    However, if you update CocoaPods to 1.9.0 you can enjoy both worlds by writing:

    use_frameworks! :linkage => :static
    

    See the details in CocoaPods blog.