Undefined symbols for x86_64 architecture for expansion using Alamofire.Request

I created a protocol for Alamofire.Response and then continue it as follows

 import Alamofire public protocol MyResponseType { typealias Value typealias Error: ErrorType var request: NSURLRequest? { get } var response: NSHTTPURLResponse? { get } var data: NSData? { get } var result: Alamofire.Result<Value, Error> { get } init(request: NSURLRequest?, response: NSHTTPURLResponse?, data: NSData?, result: Alamofire.Result<Value, Error>, timeline: Alamofire.Timeline) } extension Alamofire.Response: MyResponseType {} 

The build process has passed, but when it comes to links, it fails. Here are the errors

 Undefined symbols for architecture x86_64: "Alamofire.Response.data.getter : __ObjC.NSData?", referenced from: protocol witness for wtftest. MyResponseType.data.getter : __ObjC.NSData? in conformance <A, B where B: Swift.ErrorType> Alamofire.Response<A, B> : wtftest. MyResponseType in wtftest in ViewController.o "Alamofire.Response.result.getter : Alamofire.Result<A, B>", referenced from: protocol witness for wtftest. MyResponseType.result.getter : Alamofire.Result<A.Value, A.Error> in conformance <A, B where B: Swift.ErrorType> Alamofire.Response<A, B> : wtftest.ProducerResponseType in wtftest in ViewController.o "Alamofire.Response.request.getter : __ObjC.NSURLRequest?", referenced from: protocol witness for wtftest. MyResponseType.request.getter : __ObjC.NSURLRequest? in conformance <A, B where B: Swift.ErrorType> Alamofire.Response<A, B> : wtftest. MyResponseType in wtftest in ViewController.o "Alamofire.Response.response.getter : __ObjC.NSHTTPURLResponse?", referenced from: protocol witness for wtftest. MyResponseType.response.getter : __ObjC.NSHTTPURLResponse? in conformance <A, B where B: Swift.ErrorType> Alamofire.Response<A, B> : wtftest.ProducerResponseType in wtftest in ViewController.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) 

Is this a quick mistake? Or did I do something wrong?

+5
source share

Source: https://habr.com/ru/post/1243174/


All Articles