I'm trying to add "Custom.framework" to my pod (cocoapods). And I'm a bit stuck with pod spec setup. I've done following:
s.resources = ['Resources/Custom.framework']
s.preserve_paths = "Resources/Custom.framework"
s.frameworks = "UIKit", "Custom"
But in project where I'm using this pod, I'm getting error
<Custom/Custom.h> not found
or something similar.
I'm stuck already for a few hours and I can't find answer to my question in google.
BR, Pavlo.
After you have initially installed CocoaPods into your project, you can add new dependencies (or remove unused ones) by editing the Podfile. Then simply run pod install again.
There are two ways to get started to set up your library's folder structure: You can either set up a project with CocoaPods and then adjust it in order to work with SPM, or you can do it the other way around and start with the Swift Package Manager. file.
Cocoapods too supports the distribution and consumption of XCFramework.
What you want is the vendored_frameworks
attribute. In your case it looks like you'd want to use it like this:
s.vendored_frameworks = 'Resources/Custom.framework'
This automatically deals with preserving the path and linking the framework itself so you don't need either of those attributes for your custom 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