Hi,
I've just updated to the latest Xcode 12.5 and I am receiving the following error. I've tried to delete DerivedData and cleaned the project the error persists. I've also noticed that other projects have this issue too however I haven't found a solution yet. Has anyone also encountered this error? Does anyone know a solution?
Best regards
P.S. It is a native part of React Native project. Using the latest Starscream 4.0.4
P.P.S Interesting is that version 3.1.1. only contains one error and 4.04. seven same errors.
Undefined symbols for architecture x86_64:
"Swift._ArrayBuffer._copyContents(initializing: Swift.UnsafeMutableBufferPointer<A>) -> (Swift.IndexingIterator<Swift._ArrayBuffer<A>>, Swift.Int)", referenced from:
generic specialization <serialized, Swift._ArrayBuffer<Swift.Int8>> of Swift._copyCollectionToContiguousArray<A where A: Swift.Collection>(A) -> Swift.ContiguousArray<A.Element> in libStarscream.a(WSCompression.o)
"nominal type descriptor for (extension in Foundation):__C.NSURLSessionWebSocketTask.Message", referenced from:
_symbolic _____y___________pG s6ResultO So25NSURLSessionWebSocketTaskC10FoundationE7MessageO s5ErrorP in libStarscream.a(NativeEngine.o)
"enum case for (extension in Foundation):__C.NSURLSessionWebSocketTask.Message.data((extension in Foundation):__C.NSURLSessionWebSocketTask.Message.Type) -> (Foundation.Data) -> (extension in Foundation):__C.NSURLSessionWebSocketTask.Message", referenced from:
Starscream.NativeEngine.write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: () -> ()?) -> () in libStarscream.a(NativeEngine.o)
closure #1 (Swift.Result<(extension in Foundation):__C.NSURLSessionWebSocketTask.Message, Swift.Error>) -> () in Starscream.NativeEngine.(doRead in _2D2A33380337B5EBE48BD9833E669011)() -> () in libStarscream.a(NativeEngine.o)
"(extension in Foundation):__C.NSURLSessionWebSocketTask.receive(completionHandler: (Swift.Result<(extension in Foundation):__C.NSURLSessionWebSocketTask.Message, Swift.Error>) -> ()) -> ()", referenced from:
Starscream.NativeEngine.(doRead in _2D2A33380337B5EBE48BD9833E669011)() -> () in libStarscream.a(NativeEngine.o)
"enum case for (extension in Foundation):__C.NSURLSessionWebSocketTask.Message.string((extension in Foundation):__C.NSURLSessionWebSocketTask.Message.Type) -> (Swift.String) -> (extension in Foundation):__C.NSURLSessionWebSocketTask.Message", referenced from:
Starscream.NativeEngine.write(string: Swift.String, completion: () -> ()?) -> () in libStarscream.a(NativeEngine.o)
closure #1 (Swift.Result<(extension in Foundation):__C.NSURLSessionWebSocketTask.Message, Swift.Error>) -> () in Starscream.NativeEngine.(doRead in _2D2A33380337B5EBE48BD9833E669011)() -> () in libStarscream.a(NativeEngine.o)
"type metadata accessor for (extension in Foundation):__C.NSURLSessionWebSocketTask.Message", referenced from:
Starscream.NativeEngine.write(string: Swift.String, completion: () -> ()?) -> () in libStarscream.a(NativeEngine.o)
Starscream.NativeEngine.write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: () -> ()?) -> () in libStarscream.a(NativeEngine.o)
closure #1 (Swift.Result<(extension in Foundation):__C.NSURLSessionWebSocketTask.Message, Swift.Error>) -> () in Starscream.NativeEngine.(doRead in _2D2A33380337B5EBE48BD9833E669011)() -> () in libStarscream.a(NativeEngine.o)
outlined init with copy of Swift.Result<(extension in Foundation):__C.NSURLSessionWebSocketTask.Message, Swift.Error> in libStarscream.a(NativeEngine.o)
"(extension in Foundation):__C.NSURLSessionWebSocketTask.send(_: (extension in Foundation):__C.NSURLSessionWebSocketTask.Message, completionHandler: (Swift.Error?) -> ()) -> ()", referenced from:
Starscream.NativeEngine.write(string: Swift.String, completion: () -> ()?) -> () in libStarscream.a(NativeEngine.o)
Starscream.NativeEngine.write(data: Foundation.Data, opcode: Starscream.FrameOpCode, completion: () -> ()?) -> () in libStarscream.a(NativeEngine.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@mtoan2111
Thanks a lot! Using the first step described in the first link resolved the error.
Best
Most helpful comment
Hi,
For release scheme, It still work.
For debug scheme, please follow this post and here. It worked for me.
Regards,
Toannm