I'm maintaining a library written in Swift and distributed via CocoaPods. Since version 1.4.0 cocoapods introduced the static_framework=true
setting the podspec file. Recently, a user of the library asked me if I could add static_framework=true
setting to the podspec file of the library.
Naturally, I'm worried that if I do that it may introduce problems for existing library users. Can anything go wrong with enabling static_framework=true
? Are there any possible negative side effect for my library users?
A Podspec, or Spec, describes a version of a Pod library. One Pod, over the course of time, will have many Specs. It includes details about where the source should be fetched from, what files to use, the build settings to apply, and other general metadata such as its name, version, and description.
A Podspec file, or Spec, describes a version of a Pod library. It includes details about where the source files are located, which files to use, the build settings to apply, dependencies, frameworks used and other general metadata such as the name, version and description for the Pod.
To create a Podspec, navigate to your project file in the Terminal. Run the following command to create the file: touch FantasticView. podspec . Now open the file using an editor.
Cocoapods too supports the distribution and consumption of XCFramework.
Here are two downsides of using static_framework
:
static_framework
CocoaPod will
also need to be static frameworks. And two upsides of using static_framework
:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With