【问题标题】:Conflicting names error when installing Alamofire pod安装 Alamofire pod 时出现名称冲突错误
【发布时间】:2017-03-29 13:09:51
【问题描述】:

我创建了一个带有手表的应用程序和一个运行 Xcode 8.2.1 的 Today 扩展程序。使用 Swift 3。对于所有目标,我想使用 Alamofire 来启动请求。这在 iOS 应用程序和 Watch Extension 上运行得非常好,但 pod install 在尝试将其添加到今天的目标时会引发以下错误:

The 'Pods-xY' target has frameworks with conflicting names: alamofire.

这是我的 podfile:

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

【问题讨论】:

    标签: swift3 cocoapods xcode8 alamofire today-extension


    【解决方案1】:

    就在今天,我遇到了同样的问题。显然不可能在今天的扩展和应用程序中使用相同的框架。见this comment。

    Cocoapods 应该给出一个不错的错误消息,这是一个错误,但目前,只有 Apple 可以像您和我预期的那样修复此问题,请参阅 this comment by the same guy later in the thread。

    无赖!

    【讨论】:

    • 是的,我通过在扩展的链接框架中手动添加 Alamofire 解决了这个问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-07-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-05
    相关资源
    最近更新 更多