[!] Pods written in Swift can only be integrated as frameworks; add `use_frameworks!` to your Podfil
阿新 • • 發佈:2019-02-08
在使用cocoapod匯入Swift第三方時出現這樣的問題:
Pods written in swift can only be integrated as frameworks; add
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"
我pods swift的靜態庫就報錯,後來我去找個各種資料翻譯,大概的意思就是說蘋果不允許建包含swift的靜態庫,不同於OC可以使用平臺版本的語言版本。針對這個問題,你在新增的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
寫個部落格記錄一下,同時也希望對大家有幫助,