我将macOS升级到了10.15 Catalina,并且更新了到11.1的Xcode。现在在构建我的代码时,出现错误“error: unknown type name 'tls_protocol_version_t'”。我尝试清空构建文件夹、重置xcode和清除xcode缓存,但没有解决问题。
完整的错误日志如下:
在文件/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12中:
在文件/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:128中:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLSession.h:744:11: error: unknown type name 'tls_protocol_version_t'
@property tls_protocol_version_t TLSMinimumSupportedProtocolVersion API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));