在使用cocoapod导入
Swift
第三方时出现这样的问题:
Pods written in swift can only be integrated as frameworks; add
我pods swift的静态库就报错,后来我去找个各种资料翻译,大概的意思就是说
苹果不允许建包含swift的静态库,不同于OC可以使用平台版本的语言版本。
Pods written in swift can only be integrated as frameworks; add
use_frameworks!
to your Podfile or target to opt into using it. The Swift Pod being used is: Charts
一开始我安装oc的配置方法,桥接的oc库,
target '' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod "SDWebImage"
针对这个问题,你在添加的swift的静态库下面加一句话use_frameworks!就好了
target '' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod "SDWebImage"
pod "SnapKit"
use_frameworks!
end
写个博客记录一下,同时也希望对大家有帮助,