Search code examples
iosxcodecompiler-errorsios-simulatorcore-foundation

Xcode Error - Use of undeclared identifier 'CFByteOrder' inside 'NSByteOrder' file


I want to build a project on iPhone simulator

This a simple project that does not have much code, however, I am receiving an error of "Use of undeclared identifier 'CFByteOrderUnknown'"

in file: Xcode10_2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSByteOrder.h:9:27


Solution

  • I found out that the file CFByteOrder.h is corrupted. So I unarchived the XCode.xip, located the CFByteOrder.h file and replaced it with the correct version of it. So it works again.