Swift3 安装Alamofire吊舱时出现名称冲突错误
我创建了一个带有手表和运行Xcode 8.2.1的today扩展的应用程序。与斯威夫特3。对于所有目标,我想使用Swift3 安装Alamofire吊舱时出现名称冲突错误,swift3,cocoapods,xcode8,alamofire,today-extension,Swift3,Cocoapods,Xcode8,Alamofire,Today Extension,我创建了一个带有手表和运行Xcode 8.2.1的today扩展的应用程序。与斯威夫特3。对于所有目标,我想使用Alamofire来激发请求。这在iOS应用程序和Watch扩展上运行得非常好,但是当尝试将其添加到today目标时,pod install抛出以下错误: The 'Pods-xY' target has frameworks with conflicting names: alamofire. 这是我的播客文件: target 'xY' do use_frameworks!
Alamofire
来激发请求。这在iOS应用程序和Watch扩展上运行得非常好,但是当尝试将其添加到today目标时,pod install
抛出以下错误:
The 'Pods-xY' target has frameworks with conflicting names: alamofire.
这是我的播客文件:
target 'xY' do
use_frameworks!
pod 'Alamofire', '~> 4.4'
end
target 'xYToday' do
use_frameworks!
pod 'Alamofire', '~> 4.4'
end
target 'xYWatch Extension' do
use_frameworks!
pod 'Alamofire', '~> 4.4'
end
就在今天,我遇到了同样的问题。显然,在today扩展和应用程序中不可能使用相同的框架。看 Cocoapods应该会给出一个不错的错误消息,这是一个bug,但是现在,只有苹果能够像你我预期的那样修复这个问题,明白吗
真倒霉 是的,我通过在扩展的链接框架中手动添加Alamofire解决了这个问题。