如何解决iOS应用程序构建在App Center上失败:错误:/ usr / bin / xcodebuild失败,返回码:65
我的应用无法在App Center上构建,并出现以下错误:
/Users/runner/work/1/s/xxx/Lib/Api/ApiClient.swift:137:67: error: missing argument for parameter 'headers' in call
parameters: parameters,^,headers: <#[String : String]?#>
__ObjC.AFHTTPSessionManager:12:15: note: 'get(_:parameters:headers:progress:success:failure:)' declared here
open func get(_ URLString: String,parameters: Any?,headers: [String : String]?,progress downloadProgress: ((Progress) -> Void)?,success: ((URLSessionDataTask,Any?) -> Void)?,failure: ((URLSessionDataTask?,Error) -> Void)? = nil) -> URLSessionDataTask?
^
/Users/runner/work/1/s/xxx/Lib/Api/ApiClient.swift:143:68: error: missing argument for parameter 'headers' in call
parameters: parameters,headers: <#[String : String]?#>
__ObjC.AFHTTPSessionManager:18:15: note: 'post(_:parameters:headers:progress:success:failure:)' declared here
open func post(_ URLString: String,progress uploadProgress: ((Progress) -> Void)?,Error) -> Void)? = nil) -> URLSessionDataTask?
^
/Users/runner/work/1/s/xxx/Lib/Api/ApiClient.swift:149:69: error: missing argument for parameter 'headers' in call
parameters: parameters,headers: <#[String : String]?#>
__ObjC.AFHTTPSessionManager:27:15: note: 'patch(_:parameters:headers:success:failure:)' declared here
open func patch(_ URLString: String,Error) -> Void)? = nil) -> URLSessionDataTask?
^
/Users/runner/work/1/s/xxx/Lib/Api/ApiClient.swift:154:70: error: missing argument for parameter 'headers' in call
parameters: parameters,headers: <#[String : String]?#>
__ObjC.AFHTTPSessionManager:30:15: note: 'delete(_:parameters:headers:success:failure:)' declared here
open func delete(_ URLString: String,Error) -> Void)? = nil) -> URLSessionDataTask?
^
^
和
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
##[error]Error: /usr/bin/xcodebuild failed with return code: 65
##[section]Finishing: Xcode build (signed)
##[section]Starting: Xcode build (signed)
相关代码:
switch method {
case "GET":
requestOperation = self.get(URL,parameters: parameters,progress: nil,success: baseSuccessBlock,failure: baseFailureBlock)
case "POST":
requestOperation = self.post(URL,failure: baseFailureBlock)
case "PATCH":
requestOperation = self.patch(URL,failure: baseFailureBlock)
case "DELETE":
requestOperation = self.delete(URL,failure: baseFailureBlock)
default:
requestOperation = nil
}
该应用程序已成功在Xcode的本地计算机上构建。我在本地的构建设置为:
- iOS部署目标:11.0
- 快速语言版本:5
其他信息:
- Xcode版本:11.6
- AFNetworking Pod版本:3.2.1
- MacOS版本:Catalina 10.15.6
- Cocoapods版本:1.7.5
在App Center上,构建设置下的Xcode版本也设置为11.6。
AFNetworking窗格似乎有问题,但是在添加headers
参数Extra argument 'headers' in call
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。