Swift2 Alamofire Swift-2.0分支失败,出现多个错误

Swift2 Alamofire Swift-2.0分支失败,出现多个错误,swift2,alamofire,Swift2,Alamofire,我有Xcode7-beta4,以下是我的播客文件的相关部分: pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'swift-2.0' 我的生成失败,出现以下错误: /Users/Teja/Projects/Work/CareNarrative/Pods/Alamofire/Source/ServerTrustPolicy.swift:125:30: Cannot in

我有Xcode7-beta4,以下是我的播客文件的相关部分:

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'swift-2.0'
我的生成失败,出现以下错误:

/Users/Teja/Projects/Work/CareNarrative/Pods/Alamofire/Source/ServerTrustPolicy.swift:125:30: Cannot invoke 'append' with an argument list of type '(Unmanaged<SecCertificate>)'
/Users/Teja/Projects/Work/CareNarrative/Pods/Alamofire/Source/ServerTrustPolicy.swift:167:13: Cannot invoke 'SecTrustSetPolicies' with an argument list of type '(SecTrust, [Unmanaged<SecPolicy>!])'
/Users/Teja/Projects/Work/CareNarrative/Pods/Alamofire/Source/ServerTrustPolicy.swift:173:17: Cannot invoke 'SecTrustSetPolicies' with an argument list of type '(SecTrust, [Unmanaged<SecPolicy>!])'
/Users/Teja/Projects/Work/CareNarrative/Pods/Alamofire/Source/ServerTrustPolicy.swift:204:17: Cannot invoke 'SecTrustSetPolicies' with an argument list of type '(SecTrust, [Unmanaged<SecPolicy>!])'
/Users/Teja/Projects/Work/CareNarrative/Pods/Alamofire/Source/ServerTrustPolicy.swift:253:30: Cannot invoke 'append' with an argument list of type '(Unmanaged<SecCertificate>)'
/Users/Teja/Projects/Work/CareNarrative/Pods/Alamofire/Source/ServerTrustPolicy.swift:261:62: 'Unmanaged<CFData>!' is not convertible to 'NSData'
/Users/Teja/Projects/Work/CareNarrative/Pods/Alamofire/Source/ServerTrustPolicy.swift:272:29: Cannot invoke 'publicKeyForCertificate' with an argument list of type '(Unmanaged<SecCertificate>)'
/Users/Teja/Projects/Work/CareNarrative/Pods/Alamofire/Source/ServerTrustPolicy.swift:286:35: Cannot invoke 'SecTrustCreateWithCertificates' with an argument list of type '(SecCertificate, Unmanaged<SecPolicy>!, inout SecTrust?)'
/Users/Teja/Projects/Work/CareNarrative/Pods/Alamofire/Source/ServerTrustPolicy.swift:289:25: Cannot assign a value of type 'Unmanaged<SecKey>!' to a value of type 'SecKey?'
/Users/Teja/Projects/Work/carerarrative/Pods/Alamofire/Source/ServerTrustPolicy.swift:125:30:无法使用类型为“(非托管)”的参数列表调用“append”
/Users/Teja/Projects/Work/CareStative/Pods/Alamofire/Source/ServerTrustPolicy.swift:167:13:无法使用类型为“(SecTrust,[Unmanaged!])的参数列表调用“SectrustSetPolicys”
/Users/Teja/Projects/Work/CareStative/Pods/Alamofire/Source/ServerTrustPolicy.swift:173:17:无法使用类型为“(SecTrust,[Unmanaged!])的参数列表调用“SectrustSetPolicys”
/Users/Teja/Projects/Work/CareStative/Pods/Alamofire/Source/ServerTrustPolicy.swift:204:17:无法使用类型为“(SecTrust,[Unmanaged!])的参数列表调用“SectrustSetPolicys”
/Users/Teja/Projects/Work/CareStative/Pods/Alamofire/Source/ServerTrustPolicy.swift:253:30:无法使用类型为“(非托管)”的参数列表调用“append”
/Users/Teja/Projects/Work/CAREATRATION/Pods/Alamofire/Source/ServerTrustPolicy.swift:261:62:“非托管!”不可转换为“NSData”
/Users/Teja/Projects/Work/CareStative/Pods/Alamofire/Source/ServerTrustPolicy.swift:272:29:无法使用类型为“(非托管)”的参数列表调用“PublicKeyForceCertificate”
/Users/Teja/Projects/Work/CareStational/Pods/Alamofire/Source/ServerTrustPolicy。swift:286:35:无法使用类型为“(SecCertificate,Unmanaged!,inout SecTrust?)的参数列表调用“SecTrustCreateWithCertificates”
/Users/Teja/Projects/Work/CareStative/Pods/Alamofire/Source/ServerTrustPolicy。swift:289:25:无法分配“非托管”类型的值设置为“SecKey”类型的值
有什么想法吗

编辑:添加屏幕截图,使其更易于阅读


我们已经有很多人报告了这个问题,它总是由配置问题或过时的分支引起的。阿拉莫菲尔本身已经解决了根本问题,现在我们只需要找出“你的”问题所在。这是你需要正确设置的所有东西的列表

将CocoaPods更新至最新版本 将xcodebuild指向最新版本 如果这不是针对Xcode 7 beta 4版本,您可以在Xcode 7首选项中的
首选项
=>
位置
=>
命令行工具下设置它

重新运行CocoaPods 您在
swift-2.0
分支上可能有一些提交已过期。再次运行
pod update
,以确保从该分支获取任何新提交



通过正确设置所有这些设置,您应该能够解决问题。如果您仍然有问题,请再次评论,我将相应地调整我的答案。

谢谢,我的
xcodebuild
首选项不正确。修复它可以解决问题!我遵循了这些步骤,但不幸的是,我仍然有相同的错误。升级到Build:
7A176x
,并重复此过程后,是否需要其他步骤。
cnoon:~$ sudo gem install cocoapods
cnoon:~$ pod --version
0.38.2
cnoon:~$ xcodebuild -version
Xcode 7.0
Build version 7A165t