使用CocoaPod导入Swift第三方库报错

在使用cocoapod导入swift第三方时出现这样的错误:

[!] 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: 三方库名称

一开始我使用oc的配置方法

platform :ios, '8.0'
target '' do 
pod 'MJRefresh' 
end

 结果报错了,后来通过翻译得知,只能是集成框架,需要添加“use_frameworks!”。更改后,如下:

platform :ios, '8.0'
use_frameworks! 

target '' do 
pod 'MJRefresh' 
end

转载于:https://www.cnblogs.com/1009-smile/p/5802759.html

你可能感兴趣的:(使用CocoaPod导入Swift第三方库报错)