问题描述
在某些时候,我注意到 xcodebuild
停止工作。示例:
xtmq@xtmqmac ~ % xcodebuild --help
2021-03-09 17:13:07.961 xcodebuild[8574:125230] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-17707/Xcode3Core/LegacyProjects/Frameworks/DevToolscore/DevToolscore/Foundation/Specifications/XCSpecification.m:1521
Details: propertyList should be an instance inheriting from TSPropertyListDictionary,but it is nil
Object: <XCSpecificationProxy: 0x7ffd76f94630>
Method: -loadedSpecification
Thread: <NSThread: 0x7ffd75519810>{number = 1,name = main}
Hints:
Backtrace:
0 -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageformat:arguments:] (in DVTFoundation)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 -[XCSpecificationProxy loadedSpecification] (in DevToolscore)
4 +[XCSpecification specificationForIdentifier:inDomain:] (in DevToolscore)
5 +[PBXTarget buildSystemDefaultMacros] (in DevToolscore)
6 XCInitializeCoreIfNeeded (in DevToolscore)
7 +[Xcode3CoreInitializer ide_initializeWithOptions:error:] (in Xcode3Core)
8 _IDEInitializeBuildSystem (in IDEFoundation)
9 IDEInitialize (in IDEFoundation)
10 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
11 main (in xcodebuild)
12 start (in libdyld.dylib)
zsh: abort xcodebuild --help
有趣的事情:
- 没有目录
/Library/Caches/com.apple.xbs
- xcode 本身同时工作正常
我尝试重新安装 xcode 命令行工具,但没有成功。有什么想法吗?
解决方法
从头开始删除并重新安装 xcode 终于解决了这个问题。