从目标将字典添加到 Info.plist 时,Xcode 13 崩溃
Xcode 版本 13.3 beta 3 (13E5104i) 或版本 13.2.1 (13C100)
当我从项目中的“信息”选项卡将字典添加到 Info.plist 文件时(例如使用“隐私 - 位置临时使用说明字典”键),Xcode立即崩溃并显示以下消息,该消息似乎与添加的新项目的类型有关。
知道如何解决这个问题吗?
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-20084/DVTFoundation/MacroExpansion/DVTMacroDefinitionTable.mm:1034
Details: value must be nil, string or array, but is {
}
Object: <DVTMacroDefinitionTable: 0x7fe3afb62ce0>
Method: -_setLiteralValue:forMacroName:conditionSet:wantsCheckForDVTMacroExpansionConformance:
Thread: <_NSMainThread: 0x7fe3c480ed70>{number = 1, name = main}
Open FDs: 70/7168
Hints:
Backtrace:
0 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 -[DVTMacroDefinitionTable _setLiteralValue:forMacroName:conditionSet:wantsCheckForDVTMacroExpansionConformance:] (in DVTFoundation)
4 -[DVTMacroDefinitionTable setLiteralValue:forMacroName:conditionSet:] (in DVTFoundation)
5 -[DVTMacroDefinitionTable setObject:forKeyedSubscript:] (in DVTFoundation)
6 __52-[PBXTarget _adjustBuildSettingsForProductSettings:]_block_invoke (in DevToolsCore)
7 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ (in CoreFoundation)
8 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] (in CoreFoundation)
9 -[PBXTarget _adjustBuildSettingsForProductSettings:] (in DevToolsCore)
10 -[PBXTarget writeProductSettings:configuration:] (in DevToolsCore)
11 -[PBXTarget setProductSettings:configuration:] (in DevToolsCore)
12 -[PBXTarget setProductSettings:] (in DevToolsCore)
13 -[Xcode3ExtensionBasedInfoController setInfoDictionary:] (in Xcode3UI)
14 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] (in Foundation)
15 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] (in Foundation)
16 _NSSetObjectValueAndNotify (in Foundation)
17 __35-[Xcode3InfoEditor _createSubviews]_block_invoke (in Xcode3UI)
18 -[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:] (in DVTFoundation)
19 NSKeyValueNotifyObserver (in Foundation)
20 NSKeyValueDidChange (in Foundation)
21 NSKeyValueDidChangeWithPerThreadPendingNotifications (in Foundation)
22 -[Xcode3InfoDictionarySliceController _mergeInfoDictionaries] (in Xcode3UI)
23 -[Xcode3InfoDictionarySliceController customPlistChanged:] (in Xcode3UI)
24 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ (in CoreFoundation)
25 ___CFXRegistrationPost_block_invoke (in CoreFoundation)
26 _CFXRegistrationPost (in CoreFoundation)
27 _CFXNotificationPost (in CoreFoundation)
28 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
29 -[Xcode3InfoEditorPlistDocument propertyListChanged:] (in Xcode3UI)
30 -[DVTPlistModel _setPlistNoCopy:forKeyPath:atIndex:doReplace:doNotify:] (in DVTKit)
31 -[DVTPlistModel setKey:forPlist:] (in DVTKit)
32 -[DVTPlistModel setLocalizedKey:forPlist:] (in DVTKit)
33 -[DVTPlistViewController outlineView:setObjectValue:forTableColumn:byItem:] (in DVTKit)
34 -[NSOutlineView _dataSourceSetValue:forColumn:row:] (in AppKit)
35 -[NSTableView _setNewObjectValueFromCell:ifNotEqualTo:forTableColumn:row:] (in AppKit)
36 -[NSTableView textDidEndEditing:] (in AppKit)
37 -[DVTPlistOutlineView textDidEndEditing:] (in DVTKit)
38 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ (in CoreFoundation)
39 ___CFXRegistrationPost_block_invoke (in CoreFoundation)
40 _CFXRegistrationPost (in CoreFoundation)
41 _CFXNotificationPost (in CoreFoundation)
42 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
43 -[NSTextView(NSSharing) resignFirstResponder] (in AppKit)
44 -[NSWindow _realMakeFirstResponder:] (in AppKit)
45 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] (in AppKit)
46 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] (in AppKit)
47 -[NSWindow(NSEventRouting) sendEvent:] (in AppKit)
48 -[IDEWorkspaceWindow sendEvent:] (in IDEKit)
49 -[NSApplication(NSEvent) sendEvent:] (in AppKit)
50 -[IDEApplication sendEvent:] (in IDEKit)
51 -[NSApplication _handleEvent:] (in AppKit)
52 -[NSApplication run] (in AppKit)
53 -[DVTApplication run] (in DVTKit)
54 NSApplicationMain (in AppKit)
55 start (in dyld)
ProductBuildVersion: 13E5104i
abort() called
Xcode Version 13.3 beta 3 (13E5104i) or Version 13.2.1 (13C100)
When I add a dictionary to the Info.plist file from the Info tab in the project (for example with the Privacy - Location Temporary Usage Description Dictionary key), Xcode immediately crashes with the following message, that seems to be related to the type of new item added.
Any idea how to fix this?
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-20084/DVTFoundation/MacroExpansion/DVTMacroDefinitionTable.mm:1034
Details: value must be nil, string or array, but is {
}
Object: <DVTMacroDefinitionTable: 0x7fe3afb62ce0>
Method: -_setLiteralValue:forMacroName:conditionSet:wantsCheckForDVTMacroExpansionConformance:
Thread: <_NSMainThread: 0x7fe3c480ed70>{number = 1, name = main}
Open FDs: 70/7168
Hints:
Backtrace:
0 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 -[DVTMacroDefinitionTable _setLiteralValue:forMacroName:conditionSet:wantsCheckForDVTMacroExpansionConformance:] (in DVTFoundation)
4 -[DVTMacroDefinitionTable setLiteralValue:forMacroName:conditionSet:] (in DVTFoundation)
5 -[DVTMacroDefinitionTable setObject:forKeyedSubscript:] (in DVTFoundation)
6 __52-[PBXTarget _adjustBuildSettingsForProductSettings:]_block_invoke (in DevToolsCore)
7 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ (in CoreFoundation)
8 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] (in CoreFoundation)
9 -[PBXTarget _adjustBuildSettingsForProductSettings:] (in DevToolsCore)
10 -[PBXTarget writeProductSettings:configuration:] (in DevToolsCore)
11 -[PBXTarget setProductSettings:configuration:] (in DevToolsCore)
12 -[PBXTarget setProductSettings:] (in DevToolsCore)
13 -[Xcode3ExtensionBasedInfoController setInfoDictionary:] (in Xcode3UI)
14 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] (in Foundation)
15 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] (in Foundation)
16 _NSSetObjectValueAndNotify (in Foundation)
17 __35-[Xcode3InfoEditor _createSubviews]_block_invoke (in Xcode3UI)
18 -[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:] (in DVTFoundation)
19 NSKeyValueNotifyObserver (in Foundation)
20 NSKeyValueDidChange (in Foundation)
21 NSKeyValueDidChangeWithPerThreadPendingNotifications (in Foundation)
22 -[Xcode3InfoDictionarySliceController _mergeInfoDictionaries] (in Xcode3UI)
23 -[Xcode3InfoDictionarySliceController customPlistChanged:] (in Xcode3UI)
24 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ (in CoreFoundation)
25 ___CFXRegistrationPost_block_invoke (in CoreFoundation)
26 _CFXRegistrationPost (in CoreFoundation)
27 _CFXNotificationPost (in CoreFoundation)
28 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
29 -[Xcode3InfoEditorPlistDocument propertyListChanged:] (in Xcode3UI)
30 -[DVTPlistModel _setPlistNoCopy:forKeyPath:atIndex:doReplace:doNotify:] (in DVTKit)
31 -[DVTPlistModel setKey:forPlist:] (in DVTKit)
32 -[DVTPlistModel setLocalizedKey:forPlist:] (in DVTKit)
33 -[DVTPlistViewController outlineView:setObjectValue:forTableColumn:byItem:] (in DVTKit)
34 -[NSOutlineView _dataSourceSetValue:forColumn:row:] (in AppKit)
35 -[NSTableView _setNewObjectValueFromCell:ifNotEqualTo:forTableColumn:row:] (in AppKit)
36 -[NSTableView textDidEndEditing:] (in AppKit)
37 -[DVTPlistOutlineView textDidEndEditing:] (in DVTKit)
38 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ (in CoreFoundation)
39 ___CFXRegistrationPost_block_invoke (in CoreFoundation)
40 _CFXRegistrationPost (in CoreFoundation)
41 _CFXNotificationPost (in CoreFoundation)
42 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
43 -[NSTextView(NSSharing) resignFirstResponder] (in AppKit)
44 -[NSWindow _realMakeFirstResponder:] (in AppKit)
45 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] (in AppKit)
46 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] (in AppKit)
47 -[NSWindow(NSEventRouting) sendEvent:] (in AppKit)
48 -[IDEWorkspaceWindow sendEvent:] (in IDEKit)
49 -[NSApplication(NSEvent) sendEvent:] (in AppKit)
50 -[IDEApplication sendEvent:] (in IDEKit)
51 -[NSApplication _handleEvent:] (in AppKit)
52 -[NSApplication run] (in AppKit)
53 -[DVTApplication run] (in DVTKit)
54 NSApplicationMain (in AppKit)
55 start (in dyld)
ProductBuildVersion: 13E5104i
abort() called
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试从 info.plist 中删除 NSLocationTemporaryUsageDescriptionDictionary
try removing NSLocationTemporaryUsageDescriptionDictionary from info.plist
我通过将 NSLocationTemporaryUsageDescriptionDictionary 从自动生成的 Info.plist(目标 -> yourapp -> Info 选项卡)移动到手动 Info.plist 解决了这个问题。
I solved this issue by moving the NSLocationTemporaryUsageDescriptionDictionary from the auto-generated Info.plist (Targets -> yourapp -> Info tab) to the manual Info.plist.