Xcode 14 Xcode 13 incompatibility

When I manually add the SDK that I exported in Xcode 13 to xcode 13 and xcode 14, it works for all devices without any problems. But when I export in xcode 14, it only works for simulators in xcode 13, I can't build on real devices, (in xcode 14 it works on all devices without any problems). For the SDK I exported in Xcode 14, the errors I get when I run it on real device in xcode 13 are as follows:

directory not found for option '-F/(framework path)'
Undefined symbols for architecture arm64:_objc_msgSend$subfiles
Undefined symbols for architecture arm64:_objc_msgSend$subfiles
...
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I deleted the framework search path for the directory not found error and I found a solution to it, but I couldn't find a solution for the errors I got for all the sub-files of the SDK below:

Undefined symbols for architecture arm64:_objc_msgSend$subfiles

And

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thank you very much in advance for your comments.

Answered by nspe1103 in 732197022

After long research, I discovered the solution. Clang emits objc_msgSend in Xcode 14; previous versions of Xcode don't understand it. This needs to be disabled. Here is the link I used for the solution. Commited changes are available at this link. Big thanks to these guys.

By the way, selecting the compatible version for Xcode 14 of Command Line Tools from XCode > Preferences > Locations section, and also updating the Clang version (you can type clang -v in the terminal) to be compatible with this version. You can add -ObjC++ -std=c++14 -fno-exceptions -stdlib=libc++ -fno-objc-msgsend-selector-stubs settings to C Flags under Apple Clang - Custom Compiler Flags from Targets > Build Setting directly from Xcode.

Accepted Answer

After long research, I discovered the solution. Clang emits objc_msgSend in Xcode 14; previous versions of Xcode don't understand it. This needs to be disabled. Here is the link I used for the solution. Commited changes are available at this link. Big thanks to these guys.

By the way, selecting the compatible version for Xcode 14 of Command Line Tools from XCode > Preferences > Locations section, and also updating the Clang version (you can type clang -v in the terminal) to be compatible with this version. You can add -ObjC++ -std=c++14 -fno-exceptions -stdlib=libc++ -fno-objc-msgsend-selector-stubs settings to C Flags under Apple Clang - Custom Compiler Flags from Targets > Build Setting directly from Xcode.

Xcode 14 Xcode 13 incompatibility
 
 
Q