I've just fixed very strange bug / error/ undocumented feature on my Xcode conf.
When I was running the latest Xcode 13.4.1 and highlight / autocompletion stopped working as I believe since macOS Monterey upgrade (before I ran Xcode 12) since I "fixed" some conf values by running defaults write com.apple.dt.Xcode some keys.
Now I fixed It by deleting that edited config and re-running Xcode again and now it shows me autocompletion suggestions and follows headers when I press @@
defaults delete com.apple.dt.Xcode
I just prepared this post with the ending: What should I do to make it possible to work? Appreciate for any help (Show live issues is turned on). Since I solved it I leave these words to let anyone who needs it to fix the issue with this mini tutorial.
It somehow doesn't affect Swift code.
Here's the stripped version of my old broken conf produced by defaults read com.apple.dt.Xcode:
{
BuildSystemScheduleInherentlyParallelCommandsExclusively = 1;
CurrentAlertPreferencesSelection = "Xcode.AlertEvent.BuildStart";
"DTDKCrashLogSortDescriptors4.5" = (
{
NSAscending = 0;
NSKey = processName;
NSSelector = "compare:";
},
{
NSAscending = 1;
NSKey = type;
NSSelector = "compare:";
},
{
NSAscending = 0;
NSKey = dateTime;
NSSelector = "compare:";
}
);
DVTTextAutoSuggestCompletions = 1;
DVTTextCompletionRecentCompletions = (
NSString
);
DVTTextIndentCase = 0;
DVTTextIndentTabWidth = 2;
DVTTextIndentWidth = 2;
DVTTextShowMinimap = 0;
DVTTextSoloBraceIndentWidth = 2;
DVTTextWrappedLinesIndentWidth = 2;
IBAppliesAutoResizingRulesWhileResizing = 0;
IBDesktopImageCacheVersionKey = "12.4-13F17a";
IBGlobalLastEditorDocumentClassName = IBStoryboardDocument;
IBGlobalLastEditorTargetRuntime = "IBCocoaTouchFramework-fifteenAndLater";
IBPreferencesMigrated = 1;
IBShowingMinimapStoryboard = 0;
IBViewSizeInspectorPreferredRectTypeName = frame;
IDEActivityLogShowsAllBuildSteps = 1;
IDEActivityLogShowsAnalyzerResults = 1;
IDEActivityLogShowsErrors = 1;
IDEActivityLogShowsWarnings = 1;
"IDEAnalyticsMetricsNotifications.AnalyticsMetricsNotificationsController.lastRefreshAttemptDate" = "2022-06-08 04:27:07 +0000";
IDEAppearance = 0;
IDEBuildLocationStyle = Unique;
IDECopyFilesToTargetGroup = 0;
IDECreateGroupsForFolders = 0;
IDEDebugSessionShowDisassemblyWhenDebugging = 0;
IDEDisableGitSupportForNewProjects = 1;
IDEDisableStateRestoration = 1;
IDEDocSearchSelectedReferenceIdentifier = occ;
IDEExtensionsBuiltPriorToXcode12 = (
);
IDEFileExtensionDisplayMode = 1;
"IDEFileTemplateChooserAssistantSelectedTemplateName_iOS" = "Source/Header File";
"IDEFileTemplateChooserAssistantSelectedTemplateName_macOS" = "Source/Header File";
IDEFileTemplateChooserAssistantSelectedTemplateSection = "com.apple.platform.macosx";
IDEHasConvertedXcode3BuildPrefs = 1;
IDEIndexDisable = 1;
IDEIndexShowLog = 0;
IDEKeyBindingCurrentPreferenceSet = "Default.idekeybindings";
IDEKeyBindingExcludedPreferenceSet = (
Default
);
IDELastBreakpointActionClassName = IDESoundBreakpointAction;
IDELogNavigatorGroupByKey = 0;
IDEMaxParallelTestingWorkersMac = 0;
IDEOpenQuicklyPreferSwiftGeneratedInterface = 0;
"IDEOpenQuicklyWindowController.width" = 454;
IDEProductsViewControllerSourceListSplitPosition = 215;
IDEProfileActionSelectedTab = Info;
IDEProvisioningTeamManagerLastSelectedTeamID = XXXXXXXXXX;
IDEProvisioningTeams = {
"my@email.com" = (
{
isFreeProvisioningTeam = 1;
teamID = XXXXXXXXXX;
teamName = "Larry Moore (Personal Team)";
teamType = "Personal Team";
}
);
};
IDEShowPrebuildLogs = 0;
IDESoundBreakpointActionDefaultNameKey = Pop;
IDESourceControlPreferencesVersion = 201;
IDESuppressStandardArchitecturesUpgrade = 0;
IDESuppressStopExecutionWarning = 1;
IDESuppressStopExecutionWarningTarget = "IDESuppressStopExecutionWarningTargetValue_Stop";
IDESwiftPackageAdditionAssistantRecentlyUsedPackages = (
);
IDESwiftPackageCollectionsAddedDefaultCollectionsDVTToolsVersion = "Xcode 13.3.1";
IDETestActionSelectedTab = Info;
IDETouchBarSimulatorIsVisible = 0;
IDEUserWantsToEnableDeveloperSystemPolicyMode = 0;
LastProcessNameAttachedTo = Riot;
NSColorPanelMode = 1;
NSColorPickerPreferredRGBEntryMode = 2;
NSColorPickerSlidersDefaults = 1;
NSNavPanelExpandedStateForSaveMode = 1;
PBXNumberOfParallelBuildSubtasks = 10;
PMPrintingExpandedStateForPrint2 = 0;
PegasusMultipleCursorsEnabled = 1;
ShowBuildOperationDuration = 1;
Xcode3BuildSettingsEditorDisplayMode = 0;
Xcode3BuildSettingsEditorMode = 0;
Xcode3ProjectEditorSourceListVisible = 1;
"Xcode3ProjectTemplateChooserAssistantSelectedTemplateName_iOS" = "Application/App";
"Xcode3ProjectTemplateChooserAssistantSelectedTemplateName_macOS" = "Application/App";
Xcode3ProjectTemplateChooserAssistantSelectedTemplateSection = "com.apple.platform.iphoneos";
"Xcode3TargetTemplateChooserAssistantSelectedTemplateName_iOS" = "Application/App";
"Xcode3TargetTemplateChooserAssistantSelectedTemplateName_macOS" = "Application/Command Line Tool";
Xcode3TargetTemplateChooserAssistantSelectedTemplateSection = "com.apple.platform.macosx";
}
The only suspicious key is DVTTextAutoSuggestCompletions = 1; in this old config that might have stopped autocompletion.
Post
Replies
Boosts
Views
Activity
Every time I build my project (not any project, it seems like very simple projects are not affected) sporadically there is a pop-up window with:
XCBBuildService quit unexpectedly.
Click Reopen to open the application again. Click Report to see more detailed information and send a report to Apple.
It's absolutely not clear how to fix (btw, I am using M1 powered machine and the latest macOS Monterey).