【发布时间】:2014-07-28 01:28:28
【问题描述】:
我正在尝试将 BuddySDK 添加到包含已安装以下 pod 的现有项目中:
platform:ios, '7.0'
pod 'RestKit', '~> 0.23'
pod 'SSKeychain', '~> 1.2'
pod 'Reachability', '~> 3.1'
将 pod 'BuddySDK', '~> 2.0' 添加到项目后,我在 Xcode 中遇到如下错误:
/Users/Damiano/Library/Developer/Xcode/DerivedData/XXXXXXXXX-bgsmofalkolyjqamlxutjirazrta/Build/Products/Debug-iphoneos/libPods.a(BPAFURLRequestSerialization.o)
duplicate symbol _OBJC_CLASS_$_AFHTTPBodyPart in:
/Users/Damiano/Library/Developer/Xcode/DerivedData/XXXXXXXXX-bgsmofalkolyjqamlxutjirazrta/Build/Products/Debug-iphoneos/libPods.a(AFHTTPClient.o)
/Users/Damiano/Library/Developer/Xcode/DerivedData/XXXXXXXXX-bgsmofalkolyjqamlxutjirazrta/Build/Products/Debug-iphoneos/libPods.a(BPAFURLRequestSerialization.o)
duplicate symbol _OBJC_METACLASS_$_AFHTTPBodyPart in:
/Users/Damiano/Library/Developer/Xcode/DerivedData/XXXXXXXXX-bgsmofalkolyjqamlxutjirazrta/Build/Products/Debug-iphoneos/libPods.a(AFHTTPClient.o)
/Users/Damiano/Library/Developer/Xcode/DerivedData/XXXXXXXXX-bgsmofalkolyjqamlxutjirazrta/Build/Products/Debug-iphoneos/libPods.a(BPAFURLRequestSerialization.o)
ld: 39 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我正在寻找其他问题的解决方案,例如this,但没有任何运气。 看起来发生了错误,因为 BuddySDK 包含 RestKit 中已经存在的 AFNetworking 类。
从 Podfile 中删除 RestKit pod 后,问题就消失了。 有谁可以告诉我应该怎么做才能成功安装两个 pod(RestKit 和 BuddySDK)?
提前致谢
【问题讨论】:
标签: ios xcode afnetworking cocoapods