Xcode プラグインで通知を手当たり次第にキャッチしてみる

Xcode Plugin プログラミング

Xcode のプラグインを作っていて欲しい情報が得られない時に、通知を手当たり次第に探すみたいなことをしたりします。

その度に毎回、膨大な通知の中を探し回るのは辛かったので、とりあえず見つかった通知を全部テキストに起こしてみることにしました。


Xcode のプラグインと向き合っていると この情報が欲しいのに取れない みたいなことがよくあって、その度にクラス名を頼りに こちら で話したみたいに class-dump で抽出したヘッダーを探したり、とりあえず通知センターからの通知を全部拾って、それっぽい名前のものを見つけてみたりということをします。

特に通知は Xcode の様々な動きや状態変化を知る大事な突破口になったりするので重要ですけど、流れ来るすべての中から欲しいものを見つけ出そうとするのはけっこう苦しい作業です。

そこで、とりあえず作成中の Xcode プラグインを起動して、届いてきた全ての通知から通知名をテキストに取り出すことをしてみました。これでどれだけ自分が救われるのかは分かりませんけど。

見つかった通知の一覧

Xcode プラグインのプロジェクトを Xcode 7.3 でデバッグ起動して収集した結果、次のようになりました。

捕捉した通知を name 辞書順に並べつつ、通知に object が添えられていれば、そのクラス名を添えてあります。同じ name の通知に違う object が添えられていた場合は、それらをカンマ区切りで並べてあります。

name object
Active Workspace Tab Controller Changed Notification IDEWorkspaceTabController
CurrentExecutionTrackerCompletedNotification IDEExecutionEnvironment
DTDKDeviceAddedNotification DTDKRemoteDeviceToken
DTDKDeviceConnectionAddedNotification DTDKRemoteDeviceToken
DVTCertificateNotification_CertificatesChanged DVTCertificateUtilities
DVTDeviceUsabilityDidChangeNotification DVTLocalComputer, DVTiOSDevice, DVTiOSDevicePlaceholder, DVTiPhonePlaceholder, DVTiPhoneSimulator
DVTGlobalFindStringDidChangeNotification DVTSharedFindState
DVTGlobalReplaceStringDidChangeNotification DVTSharedFindState
DVTModelObjectGraphDidCoalesceChangesNotification DVTModelObjectGraph
DVTModelObjectGraphObjectsDidChangeNotificationName DVTModelObjectGraph
DVTModelObjectGraphWillCoalesceChangesNotification DVTModelObjectGraph
DVTProvisioningProfileManagerDidAdd nil
DVTProvisioningProfileManagerDidRemove nil
DVTSigningCertificateManagerCertificatesChangedNotification DVTSigningCertificateManager
DVTSourceExpressionSelectedExpressionDidChangeNotification IDEPlaygroundEditor, IDESourceCodeEditor
DVTSourceExpressionUnderMouseDidChangeNotification IDEWorkspace
DVTUndoManagerDidAddTopLevelChangeGroupNotification DVTUndoManager
DVTUndoManagerWasResetNotification DVTUndoManager
DVTUndoManagerWillEndUndoGroupingNotification DVTUndoManager
DVTWeakInterposerRepresentedObjectIsDeallocatingNotification DVTAssertingWeakInterposer_ProxyHelperReference, DVTWeakInterposer_ProxyHelperReference
ExecutionEnvironmentLastBuildCompletedNotification IDEExecutionEnvironment
IDEBlueprintsDidBulkChangeNotification nil
IDEBlueprintsDidChangeNotification nil
IDEBlueprintsWillBulkChangeNotification nil
IDEBuildIssueProviderUpdatedIssuesNotification nil
IDEBuildOperationDidGenerateOutputFilesNotification IDEBuildOperation
IDEBuildOperationDidStopNotification IDEBuildOperation
IDEBuildOperationWillStartNotification IDEBuildOperation
IDEContainerDidOpenContainerNotification IDEFolder, IDEFramework, IDEPlayground, IDEPlaygroundPage, IDEWorkspace, Xcode3Project
IDEControlGroupDidChangeNotificationName IDEControlGroup
IDEEditorAreaLastActiveEditorContextDidChangeNotification IDEEditorArea
IDEEditorDocumentDidChangeNotification IDEPlaygroundDocument, IDESourceCodeDocument
IDEEditorDocumentDidSaveNotification IDEPlaygroundDocument
IDEEditorDocumentHasEditsSinceLastUserInitiatedSaveStatusChangedNotification IDEPlaygroundDocument
IDEEditorDocumentIsEditedStatusDidChangeNotification IDEPlaygroundDocument
IDEEditorDocumentWillCloseNotification DBGConsoleLogDocument, DBGGaugeCPUDocument, DBGGaugeMemoryDocument, DBGMemoryBrowserDocument, DBGViewDebuggerDocument, GPUDebuggerLogDocument, GPUReportDocument, GPUTraceDocument, GPUTraceResourcesDocument, IBICCatalogDocument, IBPreviewDocument, IBStoryboardDocument, IBXIBDocument, IDEAppleScriptDocument, IDEDataModelDocument, IDEDocViewerDocument, IDEEnergyAdditionDocument, IDEEnergyGaugeDocument, IDEFileIOGaugeReportDocument, IDEHexEditorDocument, IDELogDocument, IDEMappingModelDocument, IDENetworkIOGaugeReportDocument, IDEPDFViewerDocument, IDEPlaygroundDocument, IDEPlistDocument, IDEQuickLookDocument, IDERichTextDocument, IDEScriptingDefinitionDocument, IDESourceCodeDocument, IDETextDocumentFactoryDocument, IDEToyboxDocument, SKDocument, SKEAssetCatalogDocument, SKEParticleSystemDocument, SKESceneDocument, SKEShadableObjectDocument, XCSBotEditorDocument, XCSBotIntegrationDocument, XCSBotServiceDocument, XCSLegacyBotEditorDocument, Xcode3ProjectDocument, iCloudActivityDocument
IDEEditorDocumentWillClose_ForNavigableItemCoordinatorEyesOnly_Notification DBGConsoleLogDocument, DBGGaugeCPUDocument, DBGGaugeMemoryDocument, DBGMemoryBrowserDocument, DBGViewDebuggerDocument, GPUDebuggerLogDocument, GPUReportDocument, GPUTraceDocument, GPUTraceResourcesDocument, IBICCatalogDocument, IBPreviewDocument, IBStoryboardDocument, IBXIBDocument, IDEAppleScriptDocument, IDEDataModelDocument, IDEDocViewerDocument, IDEEnergyAdditionDocument, IDEEnergyGaugeDocument, IDEFileIOGaugeReportDocument, IDEHexEditorDocument, IDELogDocument, IDEMappingModelDocument, IDENetworkIOGaugeReportDocument, IDEPDFViewerDocument, IDEPlaygroundDocument, IDEPlistDocument, IDEQuickLookDocument, IDERichTextDocument, IDEScriptingDefinitionDocument, IDESourceCodeDocument, IDETextDocumentFactoryDocument, IDEToyboxDocument, SKDocument, SKEAssetCatalogDocument, SKEParticleSystemDocument, SKESceneDocument, SKEShadableObjectDocument, XCSBotEditorDocument, XCSBotIntegrationDocument, XCSBotServiceDocument, XCSLegacyBotEditorDocument, Xcode3ProjectDocument, iCloudActivityDocument
IDEEditorDocumentWillSaveNotification IDEPlaygroundDocument
IDEIndexDidChangeNotification IDEIndex
IDEIndexDidChangeStateNotification IDEIndex
IDEIndexDidIndexWorkspaceNotification IDEIndex
IDEIndexIsIndexingWorkspaceNotification IDEIndex
IDEIndexProductInfoRegistered IDEIndex
IDEIndexProductInfoUpdated IDEIndex
IDEIndexWillIndexWorkspaceNotification IDEIndex
IDEIndexingPrebuildControllerBuildDidStopNotification IDEIndexingPrebuildController
IDEIntegrityLogDataSourceDidChangeNotification IDEWorkspace, Xcode3Project, Xcode3Target
IDEIssueManagerDidCoalesceIssuesNotification IDEIssueManager
IDEKeyBindingSetDidActivateNotification IDEMenuKeyBindingSet, IDETextKeyBindingSet
IDEKeyBindingSetWillActivateNotification IDEMenuKeyBindingSet, IDETextKeyBindingSet
IDENavigableItemCoordinatorArrangedObjectGraphChangeNotification IDENavigableItemAsyncFilteringCoordinator, IDENavigableItemCoordinator, IDENavigableItemUniquingAsyncFilteringCoordinator
IDENavigableItemCoordinatorDidForgetItemsNotification IDENavigableItemCoordinator
IDENavigableItemCoordinatorObjectGraphChangeNotification IDENavigableItemAsyncFilteringCoordinator, IDENavigableItemCoordinator
IDENavigableItemCoordinatorPropertyValuesChangeNotification IDENavigableItemCoordinator, IDENavigableItemUniquingAsyncFilteringCoordinator
IDENavigableItemCoordinatorWillForgetItemsNotification IDENavigableItemCoordinator
IDEPGAuxiliaryIssuesNotification nil
IDEPlaygroundAuxiliarySourceManagerDidCompleteCompiling IDEPlaygroundAuxiliarySourceCompilationManager
IDEPlaygroundAuxiliarySourceManagerWillBeginCompiling IDEPlaygroundAuxiliarySourceCompilationManager
IDEPlaygroundAuxiliarySourceModuleChangedNotification IDEPlaygroundDocument
IDEPlaygroundContextPagesDirectoryChangedNotification IDEPlaygroundSharedContext
IDEPlaygroundDidSelectToy nil
IDEPlaygroundLayoutManagerDidChangeSectionCharacterRangesNotification IDEPlaygroundLayoutManager
IDEPlaygroundResourcesSymlinkManagerDidSymlinkResources IDEPlaygroundResourcesSymlinkManager
IDESchemeActionRunnableDidChangeNotification IDEBuildSchemeAction, IDELaunchSchemeAction
IDESourceCodeDocumentDidUpdateSourceModelNotification IDESourceCodeDocument
IDESourceCodeEditorDidChangeLineSelectionNotification IDEPlaygroundEditor, IDESourceCodeEditor
IDESourceCodeEditorDidFinishSetup IDEPlaygroundEditor, IDESourceCodeEditor
IDESourceCodeEditorTextViewBoundsDidChangeNotification IDESourceCodeEditor
IDESourceControlDidScanWorkspaceNotification IDESourceControlWorkspaceMonitor
IDESourceControlIDEDidUpdateLocalStatusNotification nil
IDESourceControlIDEWillUpdateLocalStatusNotification nil
IDESourceControlWillScanWorkspaceNotification IDESourceControlWorkspaceMonitor
IDETextIndexDidBeginIndexingNotification IDETextIndex
IDETextIndexDidFinishIndexingNotification IDETextIndex
IDETextIndexIsIndexingNotification IDETextIndex
IDEVariablesViewDidHide IDEVariablesViewOutlineView
IDEVariablesViewDidUnhide IDEVariablesViewOutlineView
IDEWorkspaceBuildProductsLocationDidChangeNotification IDEWorkspace
IDEWorkspaceDocumentWillWriteStateDataNotification IDEWorkspaceDocument
IDEWorkspaceWindowToolbarVisibilityDidChangeNotifcation IDEWorkspaceWindow
NSAppleEventManagerWillProcessFirstEvent NSAppleEventManager
NSApplicationDidBecomeActiveNotification IDEApplication
NSApplicationDidChangeOcclusionStateNotification IDEApplication
NSApplicationDidChangeScreenParametersNotification IDEApplication
NSApplicationDidFinishLaunchingNotification IDEApplication
NSApplicationDidFinishRestoringWindowsNotification IDEApplication
NSApplicationDidResignActiveNotification IDEApplication
NSApplicationDidUpdateNotification IDEApplication
NSApplicationWillBecomeActiveNotification IDEApplication
NSApplicationWillResignActiveNotification IDEApplication
NSApplicationWillUpdateNotification IDEApplication
NSBundleDidLoadNotification nil
NSColorPanelColorDidChangeNotification NSColorPanel
NSControlTextDidEndEditingNotification SCTSearchField, _DVTTableCellViewEditableTextField
NSFileHandleDataAvailableNotification NSConcreteFileHandle
NSGestureEventMaskChanged IDEApplication
NSManagingContextDidSaveChangesNotification NSManagedObjectContext
NSManagingContextWillSaveChangesNotification NSManagedObjectContext
NSMenuDidAddItemNotification NSMenu
NSMenuDidBeginTrackingNotification NSMenu
NSMenuDidChangeItemNotification NSMenu
NSMenuDidCompleteInteractionNotification NSMenu
NSMenuDidEndTrackingNotification NSMenu
NSMenuDidRemoveAllItemsNotification NSMenu
NSMenuDidRemoveItemNotification NSMenu
NSMenuDidSendActionNotification NSMenu
NSMenuWillSendActionNotification NSMenu
NSOutlineViewColumnDidResizeNotification IDENavigatorOutlineView, IDEVariablesViewOutlineView
NSOutlineViewItemDidExpandNotification IDENavigatorOutlineView
NSOutlineViewItemWillExpandNotification IDENavigatorOutlineView
NSOutlineViewSelectionDidChangeNotification IDENavigatorOutlineView
NSPersistentStoreCoordinatorStoresDidChangeNotification NSPersistentStoreCoordinator
NSPersistentStoreCoordinatorWillRemoveStoreNotification NSSQLCore
NSPortDidBecomeInvalidNotification NSMachPort
NSProcessInfoThermalStateDidChangeNotification NSProcessInfo
NSScrollViewDidEndLiveScrollNotification DVTSourceTextScrollView
NSScrollViewDidLiveScrollNotification DVTSourceTextScrollView
NSScrollViewWillStartLiveScrollNotification DVTSourceTextScrollView
NSSegmentedCellSegmentShowingRolloverChangedNotification _DVTSegmentedCell
NSSplitViewDidAdjustSubviewsNotification DVTSplitView
NSSplitViewDidResizeSubviewsNotification DVTSplitView
NSSplitViewWillResizeSubviewsNotification DVTSplitView
NSTableViewColumnDidResizeNotification DVTTableView
NSTableViewSelectionDidChangeNotification NSTableView
NSTaskDidTerminateNotification NSConcreteTask
NSTextDidBeginEditingNotification IDEPlaygroundTextView
NSTextDidChangeNotification IDEConsoleTextView
NSTextDidEndEditingNotification DVTSourceTextView, IDEConsoleTextView
NSTextInputContextKeyboardSelectionDidChangeNotification nil
NSTextStorageDidProcessEditingNotification DVTTextStorage, nil
NSTextStorageWillProcessEditingNotification DVTTextStorage, nil
NSTextViewDidChangeSelectionNotification DVTSourceTextView, IDEConsoleTextView, IDEPlaygroundTextView
NSTextViewDidChangeTypingAttributesNotification DVTSourceTextView, IDEConsoleTextView, IDEPlaygroundTextView
NSTextViewWillChangeNotifyingTextViewNotification nil
NSThreadWillExitNotification NSThread
NSToolbarWillAddItemNotification IDECustomToolbar, _NSColorPanelToolbar
NSUndoManagerCheckpointNotification DVTUndoManager
NSUndoManagerDidCloseUndoGroupNotification DVTUndoManager
NSUndoManagerDidOpenUndoGroupNotification DVTUndoManager
NSUndoManagerWillCloseUndoGroupNotification DVTUndoManager
NSUserDefaultsDidChangeNotification NSUserDefaults
NSVBNotificationAllowAuxiliaryAppNap nil
NSVBNotificationPreventAuxiliaryAppNap nil
NSViewBoundsDidChangeNotification NSClipView
NSViewDidUpdateTrackingAreasNotification DVTBorderedView, DVTChooserView, DVTControllerContentView_ControlledBy_IDEAssetTagsInspector, DVTControllerContentView_ControlledBy_IDEConsoleArea, DVTControllerContentView_ControlledBy_IDEContainerItemInspector, DVTControllerContentView_ControlledBy_IDEDebugBar, DVTControllerContentView_ControlledBy_IDEDefaultDebugArea, DVTControllerContentView_ControlledBy_IDEEditorArea, DVTControllerContentView_ControlledBy_IDEEditorBasicMode, DVTControllerContentView_ControlledBy_IDEEditorContext, DVTControllerContentView_ControlledBy_IDEEditorEmpty, DVTControllerContentView_ControlledBy_IDEInspectorViewController, DVTControllerContentView_ControlledBy_IDEPlaygroundDebugArea, DVTControllerContentView_ControlledBy_IDEPlaygroundEditor, DVTControllerContentView_ControlledBy_IDESourceCodeEditor, DVTControllerContentView_ControlledBy_IDESourceCodePlaygroundSectionViewController, DVTControllerContentView_ControlledBy_IDETextSettingsContainerInspectorController, DVTControllerContentView_ControlledBy_IDEVariablesView, DVTControllerContentView_ControlledBy_IDEWorkspaceTabController, DVTControllerContentView_ControlledBy_Xcode3TargetMembershipInspector, DVTDelayedMenuButton, DVTDelayedMenuGradientImageButton, DVTFilePathField, DVTGradientImageButton, DVTGradientImagePopUpButton, DVTGroupedTileView, DVTLayoutView_ML, DVTLozengeTextField, DVTMarkedScroller, DVTMessageBubbleView, DVTReplacementView, DVTScopeBarButton, DVTScopeBarView, DVTScrollView, DVTScrollView_ControlledBy_IDEStructureNavigator, DVTScrollableTabBarClipView, DVTScrollableTabBarView, DVTScrollableTabBarViewAccessoryButton, DVTSearchField, DVTSegmentedControl, DVTSourceTextScrollView, DVTSourceTextView, DVTSplitView, DVTTabBarEnclosureView, DVTTableCellViewMultiLine, DVTTableCellViewOneLine, DVTTableCellViewVibrantView, DVTTableRowView, DVTTableView, DVTTextSidebarView, IDEActionButton, IDEActivityView, IDEActivityViewBackgroundButton, IDEConsoleTextView, IDEControlGroup, IDEDebugAreaBorderedView, IDEEditorMenuStepperView, IDEFirstResponderView, IDEInspectorContentView, IDEInspectorResizableTextField, IDENavBar, IDENavigatorFilterControlBar, IDENavigatorOutlineView, IDENavigatorSCMStatusTextField, IDEPathControl, IDEPlaygroundSourceTextScrollView, IDEPlaygroundTextView, IDERunPauseContinueToolbarButton, IDESchemeToolbarBorderView, IDESourceCodeEditorContainerView, IDESourceCodePlaygroundSectionContainerView, IDEUtilityAreaDVTStackView_ML, IDEUtilityDisclosureHeaderView, IDEUtilityDisclosureView, IDEUtilityPlaceholderView, IDEVariablesViewOutlineView, InvisibleScroller, NSBox, NSButton, NSButtonTextField, NSClipView, NSColorPanelColorWell, NSColorPanelResizeDimple, NSColorPickerColorSpacePopUp, NSColorPickerSelectingTextField, NSColorScaleSlider, NSColorSwatch, NSImageView, NSImageViewContainerView, NSMatrix, NSPopUpButton, NSProgressIndicator, NSScrollView, NSScroller, NSSlider, NSStepper, NSTabView, NSTextField, NSThemeFrame, NSTitlebarContainerView, NSTitlebarView, NSTokenField, NSToolbarBaselineView, NSToolbarButton, NSToolbarItemViewer, NSView, NSView_ControlledBy_IDEInspectorArea, NSView_ControlledBy_IDEIssueNavigator, NSView_ControlledBy_IDELibraryArea, NSView_ControlledBy_SKEObjectLibraryController, NSVisualEffectView, NSVisualEffectView_ControlledBy_IDENavigatorArea, ScrollableTabBarMaskingContainerView, Xcode3EmbeddedScrollView, Xcode3TargetMembershipInspectorContentView, _DVTActionPullDownButton, _DVTScrollViewSeparatorView, _DVTTableCellViewEditableTextField, _DVTTableCellViewImageView, _DVTTableCellViewTextField, _IDEEditorStepperArrowButton, _IDESwipeAnimationHostView, _NSClipViewOverhangView, _NSThemeCloseWidget, _NSThemeWidget, _NSThemeZoomWidget, _NSToolbarFlexibleSpace, _NSToolbarItemViewerLabelView, _NSToolbarViewClipView, nil
NSViewFrameDidChangeNotification DVTBorderedView, DVTChooserView, DVTControllerContentView_ControlledBy_IDEAssetTagsInspector, DVTControllerContentView_ControlledBy_IDEConsoleArea, DVTControllerContentView_ControlledBy_IDEContainerItemInspector, DVTControllerContentView_ControlledBy_IDEDebugBar, DVTControllerContentView_ControlledBy_IDEDefaultDebugArea, DVTControllerContentView_ControlledBy_IDEEditorArea, DVTControllerContentView_ControlledBy_IDEEditorBasicMode, DVTControllerContentView_ControlledBy_IDEEditorContext, DVTControllerContentView_ControlledBy_IDEEditorEmpty, DVTControllerContentView_ControlledBy_IDEInspectorViewController, DVTControllerContentView_ControlledBy_IDEPlaygroundDebugArea, DVTControllerContentView_ControlledBy_IDEPlaygroundEditor, DVTControllerContentView_ControlledBy_IDESourceCodeEditor, DVTControllerContentView_ControlledBy_IDESourceCodePlaygroundSectionAnnotationViewController, DVTControllerContentView_ControlledBy_IDESourceCodePlaygroundSectionViewController, DVTControllerContentView_ControlledBy_IDETextSettingsContainerInspectorController, DVTControllerContentView_ControlledBy_IDEVariablesView, DVTControllerContentView_ControlledBy_IDEWorkspaceTabController, DVTControllerContentView_ControlledBy_Xcode3TargetMembershipInspector, DVTDelayedMenuButton, DVTDelayedMenuGradientImageButton, DVTFilePathField, DVTGradientImageButton, DVTGradientImagePopUpButton, DVTGroupedTileView, DVTLayoutView_ML, DVTLozengeTextField, DVTMarkedScroller, DVTMessageBubbleView, DVTReplacementView, DVTRolloverImageButton, DVTScopeBarButton, DVTScopeBarView, DVTScrollView, DVTScrollView_ControlledBy_IDEStructureNavigator, DVTScrollableTabBarClipView, DVTScrollableTabBarView, DVTScrollableTabBarViewAccessoryButton, DVTScrollableTabButton, DVTSearchField, DVTSegmentedControl, DVTSourceTextScrollView, DVTSourceTextView, DVTSplitView, DVTStepperTextField, DVTTabBarEnclosureView, DVTTableCellViewMultiLine, DVTTableCellViewOneLine, DVTTableCellViewVibrantView, DVTTableRowView, DVTTableView, DVTTextSidebarView, IDEActionButton, IDEActivityView, IDEActivityViewBackgroundButton, IDEConsoleTextView, IDEControlGroup, IDEDebugAreaBorderedView, IDEEditorMenuStepperView, IDEFirstResponderView, IDEInspectorContentView, IDEInspectorResizableTextField, IDENavBar, IDENavigatorFilterControlBar, IDENavigatorOutlineView, IDENavigatorSCMStatusTextField, IDEPathControl, IDEPlaygroundSourceTextScrollView, IDEPlaygroundTextView, IDERunPauseContinueToolbarButton, IDESchemeToolbarBorderView, IDESourceCodeEditorContainerView, IDESourceCodePlaygroundSectionContainerView, IDEUtilityAreaDVTStackView_ML, IDEUtilityDisclosureHeaderView, IDEUtilityDisclosureView, IDEUtilityPlaceholderView, IDEVariablesViewOutlineView, InvisibleScroller, NSBox, NSButton, NSButtonTextField, NSClipView, NSColorPanelColorWell, NSColorPanelResizeDimple, NSColorPickerColorSpacePopUp, NSColorPickerSelectingTextField, NSColorScaleSlider, NSColorSwatch, NSImageView, NSMatrix, NSPopUpButton, NSProgressIndicator, NSScrollView, NSScroller, NSSlider, NSStepper, NSTabView, NSTextField, NSThemeFrame, NSTitlebarContainerView, NSTitlebarView, NSTokenField, NSToolbarBaselineView, NSToolbarButton, NSToolbarClippedItemsIndicator, NSToolbarItemViewer, NSView, NSView_ControlledBy_IDEInspectorArea, NSView_ControlledBy_IDEIssueNavigator, NSView_ControlledBy_IDELibraryArea, NSView_ControlledBy_SKEObjectLibraryController, NSVisualEffectView, NSVisualEffectView_ControlledBy_IDENavigatorArea, ScrollableTabBarMaskingContainerView, Xcode3EmbeddedScrollView, Xcode3TargetMembershipInspectorContentView, _DVTActionPullDownButton, _DVTScrollViewSeparatorView, _DVTTableCellViewEditableTextField, _DVTTableCellViewImageView, _DVTTableCellViewTextField, _IDEEditorStepperArrowButton, _IDESourceCodePlaygroundSectionAnnotationView, _IDESwipeAnimationHostView, _NSClipViewOverhangView, _NSThemeCloseWidget, _NSThemeWidget, _NSThemeZoomWidget, _NSToolbarFlexibleSpace, _NSToolbarViewClipView, nil
NSWindowBackgroundGradientDidChangeNotification NSColorPanel
NSWindowDidBecomeKeyNotification IDEWorkspaceWindow
NSWindowDidBecomeMainNotification IDEWorkspaceWindow
NSWindowDidChangeBackingPropertiesNotification NSCarbonMenuWindow
NSWindowDidChangeOcclusionStateNotification IDEWorkspaceWindow, NSWindow
NSWindowDidChangeResolutionNotification NSCarbonMenuWindow
NSWindowDidChangeScreenNotification IDEWorkspaceWindow
NSWindowDidCloseNotification DVTTextCompletionWindow, NSWindow
NSWindowDidMoveNotification IDEWorkspaceWindow
NSWindowDidOrderOffScreenAndFinishAnimatingNotification DVTTextCompletionWindow, NSWindow
NSWindowDidOrderOffScreenNotification DVTTextCompletionWindow, NSWindow
NSWindowDidOrderOnScreenAndFinishAnimatingNotification IDEWorkspaceWindow
NSWindowDidResignKeyNotification IDEWorkspaceWindow
NSWindowDidResignMainNotification IDEWorkspaceWindow
NSWindowDidResizeNotification IDEWorkspaceWindow, NSColorPanel
NSWindowDidUpdateNotification IDEWorkspaceWindow
NSWindowWillCloseNotification DVTTextCompletionWindow, NSWindow
NSWindowWillMoveNotification IDEWorkspaceWindow
NSWindowWillOrderOffScreenNotification DVTTextCompletionWindow, NSWindow
PBXProjectDidOpenNotification PBXProject
PBXTargetBuildSettingsDidChangeNotification PBXNativeTarget
PBXTargetProductReferenceDidChangeNotification PBXNativeTarget
PBXUnarchiverDidFinishUnarchivingNotification PBXPListUnarchiver
XCBuildContextDidCreateDependencyGraphNotification nil
XCBuildContextDidFinishSettingTargetSnapshotNotification nil
XCProfileChangeEventNotification nil
XCPropertyInfoContext_DictionaryWasAdded XCPropertyInfoContext
XCPropertyInfoContext_WillBeDiscardedNotification XCPropertyInfoContext
_NSPersistentStoreCoordinatorStoresDidChangePrivateNotification NSPersistentStoreCoordinator
_NSSQLCoreTransactionStateChangeNotification NSSQLCore
_NSThreadDidStartNotification NSThread
_NSWindowDidBecomeVisible IDEWorkspaceWindow
_NSWindowDidChangeWindowNumber IDEWorkspaceWindow, NSColorPanel, NSWindow
_NSWindowWillBecomeVisible IDEWorkspaceWindow
_NSWindowWillChangeWindowNumber IDEWorkspaceWindow, NSColorPanel, NSWindow
kC3DNotificationEngineContextInvalidatePasses nil
kNotificationGeometryWillDie C3DGeometry
kNotificationMeshSourceWillDie nil
kNotificationMeshWillDie nil

通知の収集後記

せっかくなので参考に、上記の通知一覧を作った流れを記載しておきます。

通知をログに記録

通知をログに記録するために、プラグインを制御するクラスのイニシャライザで、次のようにしてみました。

- (id)init
{
    self = [super init];
	
    if (self)
    {
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveAnyNotification:) name:nil object:nil];
    }

    return self;
}

- (void)receiveAnyNotification:(NSNotification*)sender
{
    NSLog(@"Receive : %@", sender);
}

通知センターに登録する際に nameobjectnil で指定することで、手当たり次第に受け取るようにします。そして通知を受け取った時に Receive : に続けて通知の内容をログ出力しています。

ログから名前を抽出

そうして Xcode プラグインをデバッグ起動してしばらくログ出力をしたら、そんな Xcode のコンソールログを丸ごとテキストファイルに保存した上で、次の Perl スクリプトに通して名前を抽出します。この時、実行時に不要な通知をフィルターするために使えるように Objective-C の配列リテラルに書式を合わせてみました。

#!/usr/bin/perl

use strict;

my %notifications = ();

open(SOURCE, '<NotificationNames.PickupSource.txt');
open(RESULT, '>NotificationNames.out.txt');

while (<SOURCE>)
{
	if (/Receive : .*\s*{name\s*=\s*([\w ]*)\s*(?:;\s*object\s*=\s*<(\w+):|)/)
	{
		my $name = $1;
		my $object = $2 || 'nil';

		$notifications{$name} = [] if (!exists($notifications{$name}));

		push @{$notifications{$name}}, $object;
	}
}

my @names = sort { $a cmp $b } keys(%notifications);
my @definitions = ();

for my $name (@names)
{
	$notifications{$name} = [ keys %{{ map {$_ => 1} @{$notifications{$name}} }} ];
	push @definitions, "@\"$name\",    // object = " . join(', ', @{$notifications{$name}});
}

print RESULT "@[\n";
print RESULT join("\n", @definitions);
print RESULT "\n]\n";

close RESULT;
close SOURCE;

通知をフィルタリング

そうしてできたリテラルを元に、先ほどの receiveAnyNotification:メソッド を改良して、とりあえず見つかった全ての通知をログ出力しないようにしてみました。長いですが、とりあえずこんなコードを記載してそれっぽい名前のところをコメントアウトすることで、それに関する通知はフィルタリングされないようになります。

- (void)receiveAnyNotification:(NSNotification*)sender {

    NSArray<NSString*> *ignoreNames =
    @[
      @"Active Workspace Tab Controller Changed Notification",    // object = IDEWorkspaceTabController
      @"CurrentExecutionTrackerCompletedNotification",    // object = IDEExecutionEnvironment
      @"DTDKDeviceAddedNotification",    // object = DTDKRemoteDeviceToken
      @"DTDKDeviceConnectionAddedNotification",    // object = DTDKRemoteDeviceToken
      @"DVTCertificateNotification_CertificatesChanged",    // object = DVTCertificateUtilities
      @"DVTDeviceUsabilityDidChangeNotification",    // object = DVTLocalComputer, DVTiOSDevice, DVTiOSDevicePlaceholder, DVTiPhonePlaceholder, DVTiPhoneSimulator
      @"DVTGlobalFindStringDidChangeNotification",    // object = DVTSharedFindState
      @"DVTGlobalReplaceStringDidChangeNotification",    // object = DVTSharedFindState
      @"DVTModelObjectGraphDidCoalesceChangesNotification",    // object = DVTModelObjectGraph
      @"DVTModelObjectGraphObjectsDidChangeNotificationName",    // object = DVTModelObjectGraph
      @"DVTModelObjectGraphWillCoalesceChangesNotification",    // object = DVTModelObjectGraph
      @"DVTProvisioningProfileManagerDidAdd",    // object = nil
      @"DVTProvisioningProfileManagerDidRemove",    // object = nil
      @"DVTSigningCertificateManagerCertificatesChangedNotification",    // object = DVTSigningCertificateManager
      @"DVTSourceExpressionSelectedExpressionDidChangeNotification",    // object = IDEPlaygroundEditor, IDESourceCodeEditor
      @"DVTSourceExpressionUnderMouseDidChangeNotification",    // object = IDEWorkspace
      @"DVTUndoManagerDidAddTopLevelChangeGroupNotification",    // object = DVTUndoManager
      @"DVTUndoManagerWasResetNotification",    // object = DVTUndoManager
      @"DVTUndoManagerWillEndUndoGroupingNotification",    // object = DVTUndoManager
      @"DVTWeakInterposerRepresentedObjectIsDeallocatingNotification",    // object = DVTAssertingWeakInterposer_ProxyHelperReference, DVTWeakInterposer_ProxyHelperReference
      @"ExecutionEnvironmentLastBuildCompletedNotification",    // object = IDEExecutionEnvironment
      @"IDEBlueprintsDidBulkChangeNotification",    // object = nil
      @"IDEBlueprintsDidChangeNotification",    // object = nil
      @"IDEBlueprintsWillBulkChangeNotification",    // object = nil
      @"IDEBuildIssueProviderUpdatedIssuesNotification",    // object = nil
      @"IDEBuildOperationDidGenerateOutputFilesNotification",    // object = IDEBuildOperation
      @"IDEBuildOperationDidStopNotification",    // object = IDEBuildOperation
      @"IDEBuildOperationWillStartNotification",    // object = IDEBuildOperation
      @"IDEContainerDidOpenContainerNotification",    // object = IDEFolder, IDEFramework, IDEPlayground, IDEPlaygroundPage, IDEWorkspace, Xcode3Project
      @"IDEControlGroupDidChangeNotificationName",    // object = IDEControlGroup
      @"IDEEditorAreaLastActiveEditorContextDidChangeNotification",    // object = IDEEditorArea
      @"IDEEditorDocumentDidChangeNotification",    // object = IDEPlaygroundDocument, IDESourceCodeDocument
      @"IDEEditorDocumentDidSaveNotification",    // object = IDEPlaygroundDocument
      @"IDEEditorDocumentHasEditsSinceLastUserInitiatedSaveStatusChangedNotification",    // object = IDEPlaygroundDocument
      @"IDEEditorDocumentIsEditedStatusDidChangeNotification",    // object = IDEPlaygroundDocument
      @"IDEEditorDocumentWillCloseNotification",    // object = DBGConsoleLogDocument, DBGGaugeCPUDocument, DBGGaugeMemoryDocument, DBGMemoryBrowserDocument, DBGViewDebuggerDocument, GPUDebuggerLogDocument, GPUReportDocument, GPUTraceDocument, GPUTraceResourcesDocument, IBICCatalogDocument, IBPreviewDocument, IBStoryboardDocument, IBXIBDocument, IDEAppleScriptDocument, IDEDataModelDocument, IDEDocViewerDocument, IDEEnergyAdditionDocument, IDEEnergyGaugeDocument, IDEFileIOGaugeReportDocument, IDEHexEditorDocument, IDELogDocument, IDEMappingModelDocument, IDENetworkIOGaugeReportDocument, IDEPDFViewerDocument, IDEPlaygroundDocument, IDEPlistDocument, IDEQuickLookDocument, IDERichTextDocument, IDEScriptingDefinitionDocument, IDESourceCodeDocument, IDETextDocumentFactoryDocument, IDEToyboxDocument, SKDocument, SKEAssetCatalogDocument, SKEParticleSystemDocument, SKESceneDocument, SKEShadableObjectDocument, XCSBotEditorDocument, XCSBotIntegrationDocument, XCSBotServiceDocument, XCSLegacyBotEditorDocument, Xcode3ProjectDocument, iCloudActivityDocument
      @"IDEEditorDocumentWillClose_ForNavigableItemCoordinatorEyesOnly_Notification",    // object = DBGConsoleLogDocument, DBGGaugeCPUDocument, DBGGaugeMemoryDocument, DBGMemoryBrowserDocument, DBGViewDebuggerDocument, GPUDebuggerLogDocument, GPUReportDocument, GPUTraceDocument, GPUTraceResourcesDocument, IBICCatalogDocument, IBPreviewDocument, IBStoryboardDocument, IBXIBDocument, IDEAppleScriptDocument, IDEDataModelDocument, IDEDocViewerDocument, IDEEnergyAdditionDocument, IDEEnergyGaugeDocument, IDEFileIOGaugeReportDocument, IDEHexEditorDocument, IDELogDocument, IDEMappingModelDocument, IDENetworkIOGaugeReportDocument, IDEPDFViewerDocument, IDEPlaygroundDocument, IDEPlistDocument, IDEQuickLookDocument, IDERichTextDocument, IDEScriptingDefinitionDocument, IDESourceCodeDocument, IDETextDocumentFactoryDocument, IDEToyboxDocument, SKDocument, SKEAssetCatalogDocument, SKEParticleSystemDocument, SKESceneDocument, SKEShadableObjectDocument, XCSBotEditorDocument, XCSBotIntegrationDocument, XCSBotServiceDocument, XCSLegacyBotEditorDocument, Xcode3ProjectDocument, iCloudActivityDocument
      @"IDEEditorDocumentWillSaveNotification",    // object = IDEPlaygroundDocument
      @"IDEIndexDidChangeNotification",    // object = IDEIndex
      @"IDEIndexDidChangeStateNotification",    // object = IDEIndex
      @"IDEIndexDidIndexWorkspaceNotification",    // object = IDEIndex
      @"IDEIndexIsIndexingWorkspaceNotification",    // object = IDEIndex
      @"IDEIndexProductInfoRegistered",    // object = IDEIndex
      @"IDEIndexProductInfoUpdated",    // object = IDEIndex
      @"IDEIndexWillIndexWorkspaceNotification",    // object = IDEIndex
      @"IDEIndexingPrebuildControllerBuildDidStopNotification",    // object = IDEIndexingPrebuildController
      @"IDEIntegrityLogDataSourceDidChangeNotification",    // object = IDEWorkspace, Xcode3Project, Xcode3Target
      @"IDEIssueManagerDidCoalesceIssuesNotification",    // object = IDEIssueManager
      @"IDEKeyBindingSetDidActivateNotification",    // object = IDEMenuKeyBindingSet, IDETextKeyBindingSet
      @"IDEKeyBindingSetWillActivateNotification",    // object = IDEMenuKeyBindingSet, IDETextKeyBindingSet
      @"IDENavigableItemCoordinatorArrangedObjectGraphChangeNotification",    // object = IDENavigableItemAsyncFilteringCoordinator, IDENavigableItemCoordinator, IDENavigableItemUniquingAsyncFilteringCoordinator
      @"IDENavigableItemCoordinatorDidForgetItemsNotification",    // object = IDENavigableItemCoordinator
      @"IDENavigableItemCoordinatorObjectGraphChangeNotification",    // object = IDENavigableItemAsyncFilteringCoordinator, IDENavigableItemCoordinator
      @"IDENavigableItemCoordinatorPropertyValuesChangeNotification",    // object = IDENavigableItemCoordinator, IDENavigableItemUniquingAsyncFilteringCoordinator
      @"IDENavigableItemCoordinatorWillForgetItemsNotification",    // object = IDENavigableItemCoordinator
      @"IDEPGAuxiliaryIssuesNotification",    // object = nil
      @"IDEPlaygroundAuxiliarySourceManagerDidCompleteCompiling",    // object = IDEPlaygroundAuxiliarySourceCompilationManager
      @"IDEPlaygroundAuxiliarySourceManagerWillBeginCompiling",    // object = IDEPlaygroundAuxiliarySourceCompilationManager
      @"IDEPlaygroundAuxiliarySourceModuleChangedNotification",    // object = IDEPlaygroundDocument
      @"IDEPlaygroundContextPagesDirectoryChangedNotification",    // object = IDEPlaygroundSharedContext
      @"IDEPlaygroundDidSelectToy",    // object = nil
      @"IDEPlaygroundLayoutManagerDidChangeSectionCharacterRangesNotification",    // object = IDEPlaygroundLayoutManager
      @"IDEPlaygroundResourcesSymlinkManagerDidSymlinkResources",    // object = IDEPlaygroundResourcesSymlinkManager
      @"IDESchemeActionRunnableDidChangeNotification",    // object = IDEBuildSchemeAction, IDELaunchSchemeAction
      @"IDESourceCodeDocumentDidUpdateSourceModelNotification",    // object = IDESourceCodeDocument
      @"IDESourceCodeEditorDidChangeLineSelectionNotification",    // object = IDEPlaygroundEditor, IDESourceCodeEditor
      @"IDESourceCodeEditorDidFinishSetup",    // object = IDEPlaygroundEditor, IDESourceCodeEditor
      @"IDESourceCodeEditorTextViewBoundsDidChangeNotification",    // object = IDESourceCodeEditor
      @"IDESourceControlDidScanWorkspaceNotification",    // object = IDESourceControlWorkspaceMonitor
      @"IDESourceControlIDEDidUpdateLocalStatusNotification",    // object = nil
      @"IDESourceControlIDEWillUpdateLocalStatusNotification",    // object = nil
      @"IDESourceControlWillScanWorkspaceNotification",    // object = IDESourceControlWorkspaceMonitor
      @"IDETextIndexDidBeginIndexingNotification",    // object = IDETextIndex
      @"IDETextIndexDidFinishIndexingNotification",    // object = IDETextIndex
      @"IDETextIndexIsIndexingNotification",    // object = IDETextIndex
      @"IDEVariablesViewDidHide",    // object = IDEVariablesViewOutlineView
      @"IDEVariablesViewDidUnhide",    // object = IDEVariablesViewOutlineView
      @"IDEWorkspaceBuildProductsLocationDidChangeNotification",    // object = IDEWorkspace
      @"IDEWorkspaceDocumentWillWriteStateDataNotification",    // object = IDEWorkspaceDocument
      @"IDEWorkspaceWindowToolbarVisibilityDidChangeNotifcation",    // object = IDEWorkspaceWindow
      @"NSAppleEventManagerWillProcessFirstEvent",    // object = NSAppleEventManager
      @"NSApplicationDidBecomeActiveNotification",    // object = IDEApplication
      @"NSApplicationDidChangeOcclusionStateNotification",    // object = IDEApplication
      @"NSApplicationDidChangeScreenParametersNotification",    // object = IDEApplication
      @"NSApplicationDidFinishLaunchingNotification",    // object = IDEApplication
      @"NSApplicationDidFinishRestoringWindowsNotification",    // object = IDEApplication
      @"NSApplicationDidResignActiveNotification",    // object = IDEApplication
      @"NSApplicationDidUpdateNotification",    // object = IDEApplication
      @"NSApplicationWillBecomeActiveNotification",    // object = IDEApplication
      @"NSApplicationWillResignActiveNotification",    // object = IDEApplication
      @"NSApplicationWillUpdateNotification",    // object = IDEApplication
      @"NSBundleDidLoadNotification",    // object = nil
      @"NSColorPanelColorDidChangeNotification",    // object = NSColorPanel
      @"NSControlTextDidEndEditingNotification",    // object = SCTSearchField, _DVTTableCellViewEditableTextField
      @"NSFileHandleDataAvailableNotification",    // object = NSConcreteFileHandle
      @"NSGestureEventMaskChanged",    // object = IDEApplication
      @"NSManagingContextDidSaveChangesNotification",    // object = NSManagedObjectContext
      @"NSManagingContextWillSaveChangesNotification",    // object = NSManagedObjectContext
      @"NSMenuDidAddItemNotification",    // object = NSMenu
      @"NSMenuDidBeginTrackingNotification",    // object = NSMenu
      @"NSMenuDidChangeItemNotification",    // object = NSMenu
      @"NSMenuDidCompleteInteractionNotification",    // object = NSMenu
      @"NSMenuDidEndTrackingNotification",    // object = NSMenu
      @"NSMenuDidRemoveAllItemsNotification",    // object = NSMenu
      @"NSMenuDidRemoveItemNotification",    // object = NSMenu
      @"NSMenuDidSendActionNotification",    // object = NSMenu
      @"NSMenuWillSendActionNotification",    // object = NSMenu
      @"NSOutlineViewColumnDidResizeNotification",    // object = IDENavigatorOutlineView, IDEVariablesViewOutlineView
      @"NSOutlineViewItemDidExpandNotification",    // object = IDENavigatorOutlineView
      @"NSOutlineViewItemWillExpandNotification",    // object = IDENavigatorOutlineView
      @"NSOutlineViewSelectionDidChangeNotification",    // object = IDENavigatorOutlineView
      @"NSPersistentStoreCoordinatorStoresDidChangeNotification",    // object = NSPersistentStoreCoordinator
      @"NSPersistentStoreCoordinatorWillRemoveStoreNotification",    // object = NSSQLCore
      @"NSPortDidBecomeInvalidNotification",    // object = NSMachPort
      @"NSProcessInfoThermalStateDidChangeNotification",    // object = NSProcessInfo
      @"NSScrollViewDidEndLiveScrollNotification",    // object = DVTSourceTextScrollView
      @"NSScrollViewDidLiveScrollNotification",    // object = DVTSourceTextScrollView
      @"NSScrollViewWillStartLiveScrollNotification",    // object = DVTSourceTextScrollView
      @"NSSegmentedCellSegmentShowingRolloverChangedNotification",    // object = _DVTSegmentedCell
      @"NSSplitViewDidAdjustSubviewsNotification",    // object = DVTSplitView
      @"NSSplitViewDidResizeSubviewsNotification",    // object = DVTSplitView
      @"NSSplitViewWillResizeSubviewsNotification",    // object = DVTSplitView
      @"NSTableViewColumnDidResizeNotification",    // object = DVTTableView
      @"NSTableViewSelectionDidChangeNotification",    // object = NSTableView
      @"NSTaskDidTerminateNotification",    // object = NSConcreteTask
      @"NSTextDidBeginEditingNotification",    // object = IDEPlaygroundTextView
      @"NSTextDidChangeNotification",    // object = IDEConsoleTextView
      @"NSTextDidEndEditingNotification",    // object = DVTSourceTextView, IDEConsoleTextView
      @"NSTextInputContextKeyboardSelectionDidChangeNotification",    // object = nil
      @"NSTextStorageDidProcessEditingNotification",    // object = DVTTextStorage, nil
      @"NSTextStorageWillProcessEditingNotification",    // object = DVTTextStorage, nil
      @"NSTextViewDidChangeSelectionNotification",    // object = DVTSourceTextView, IDEConsoleTextView, IDEPlaygroundTextView
      @"NSTextViewDidChangeTypingAttributesNotification",    // object = DVTSourceTextView, IDEConsoleTextView, IDEPlaygroundTextView
      @"NSTextViewWillChangeNotifyingTextViewNotification",    // object = nil
      @"NSThreadWillExitNotification",    // object = NSThread
      @"NSToolbarWillAddItemNotification",    // object = IDECustomToolbar, _NSColorPanelToolbar
      @"NSUndoManagerCheckpointNotification",    // object = DVTUndoManager
      @"NSUndoManagerDidCloseUndoGroupNotification",    // object = DVTUndoManager
      @"NSUndoManagerDidOpenUndoGroupNotification",    // object = DVTUndoManager
      @"NSUndoManagerWillCloseUndoGroupNotification",    // object = DVTUndoManager
      @"NSUserDefaultsDidChangeNotification",    // object = NSUserDefaults
      @"NSVBNotificationAllowAuxiliaryAppNap",    // object = nil
      @"NSVBNotificationPreventAuxiliaryAppNap",    // object = nil
      @"NSViewBoundsDidChangeNotification",    // object = NSClipView
      @"NSViewDidUpdateTrackingAreasNotification",    // object = DVTBorderedView, DVTChooserView, DVTControllerContentView_ControlledBy_IDEAssetTagsInspector, DVTControllerContentView_ControlledBy_IDEConsoleArea, DVTControllerContentView_ControlledBy_IDEContainerItemInspector, DVTControllerContentView_ControlledBy_IDEDebugBar, DVTControllerContentView_ControlledBy_IDEDefaultDebugArea, DVTControllerContentView_ControlledBy_IDEEditorArea, DVTControllerContentView_ControlledBy_IDEEditorBasicMode, DVTControllerContentView_ControlledBy_IDEEditorContext, DVTControllerContentView_ControlledBy_IDEEditorEmpty, DVTControllerContentView_ControlledBy_IDEInspectorViewController, DVTControllerContentView_ControlledBy_IDEPlaygroundDebugArea, DVTControllerContentView_ControlledBy_IDEPlaygroundEditor, DVTControllerContentView_ControlledBy_IDESourceCodeEditor, DVTControllerContentView_ControlledBy_IDESourceCodePlaygroundSectionViewController, DVTControllerContentView_ControlledBy_IDETextSettingsContainerInspectorController, DVTControllerContentView_ControlledBy_IDEVariablesView, DVTControllerContentView_ControlledBy_IDEWorkspaceTabController, DVTControllerContentView_ControlledBy_Xcode3TargetMembershipInspector, DVTDelayedMenuButton, DVTDelayedMenuGradientImageButton, DVTFilePathField, DVTGradientImageButton, DVTGradientImagePopUpButton, DVTGroupedTileView, DVTLayoutView_ML, DVTLozengeTextField, DVTMarkedScroller, DVTMessageBubbleView, DVTReplacementView, DVTScopeBarButton, DVTScopeBarView, DVTScrollView, DVTScrollView_ControlledBy_IDEStructureNavigator, DVTScrollableTabBarClipView, DVTScrollableTabBarView, DVTScrollableTabBarViewAccessoryButton, DVTSearchField, DVTSegmentedControl, DVTSourceTextScrollView, DVTSourceTextView, DVTSplitView, DVTTabBarEnclosureView, DVTTableCellViewMultiLine, DVTTableCellViewOneLine, DVTTableCellViewVibrantView, DVTTableRowView, DVTTableView, DVTTextSidebarView, IDEActionButton, IDEActivityView, IDEActivityViewBackgroundButton, IDEConsoleTextView, IDEControlGroup, IDEDebugAreaBorderedView, IDEEditorMenuStepperView, IDEFirstResponderView, IDEInspectorContentView, IDEInspectorResizableTextField, IDENavBar, IDENavigatorFilterControlBar, IDENavigatorOutlineView, IDENavigatorSCMStatusTextField, IDEPathControl, IDEPlaygroundSourceTextScrollView, IDEPlaygroundTextView, IDERunPauseContinueToolbarButton, IDESchemeToolbarBorderView, IDESourceCodeEditorContainerView, IDESourceCodePlaygroundSectionContainerView, IDEUtilityAreaDVTStackView_ML, IDEUtilityDisclosureHeaderView, IDEUtilityDisclosureView, IDEUtilityPlaceholderView, IDEVariablesViewOutlineView, InvisibleScroller, NSBox, NSButton, NSButtonTextField, NSClipView, NSColorPanelColorWell, NSColorPanelResizeDimple, NSColorPickerColorSpacePopUp, NSColorPickerSelectingTextField, NSColorScaleSlider, NSColorSwatch, NSImageView, NSImageViewContainerView, NSMatrix, NSPopUpButton, NSProgressIndicator, NSScrollView, NSScroller, NSSlider, NSStepper, NSTabView, NSTextField, NSThemeFrame, NSTitlebarContainerView, NSTitlebarView, NSTokenField, NSToolbarBaselineView, NSToolbarButton, NSToolbarItemViewer, NSView, NSView_ControlledBy_IDEInspectorArea, NSView_ControlledBy_IDEIssueNavigator, NSView_ControlledBy_IDELibraryArea, NSView_ControlledBy_SKEObjectLibraryController, NSVisualEffectView, NSVisualEffectView_ControlledBy_IDENavigatorArea, ScrollableTabBarMaskingContainerView, Xcode3EmbeddedScrollView, Xcode3TargetMembershipInspectorContentView, _DVTActionPullDownButton, _DVTScrollViewSeparatorView, _DVTTableCellViewEditableTextField, _DVTTableCellViewImageView, _DVTTableCellViewTextField, _IDEEditorStepperArrowButton, _IDESwipeAnimationHostView, _NSClipViewOverhangView, _NSThemeCloseWidget, _NSThemeWidget, _NSThemeZoomWidget, _NSToolbarFlexibleSpace, _NSToolbarItemViewerLabelView, _NSToolbarViewClipView, nil
      @"NSViewFrameDidChangeNotification",    // object = DVTBorderedView, DVTChooserView, DVTControllerContentView_ControlledBy_IDEAssetTagsInspector, DVTControllerContentView_ControlledBy_IDEConsoleArea, DVTControllerContentView_ControlledBy_IDEContainerItemInspector, DVTControllerContentView_ControlledBy_IDEDebugBar, DVTControllerContentView_ControlledBy_IDEDefaultDebugArea, DVTControllerContentView_ControlledBy_IDEEditorArea, DVTControllerContentView_ControlledBy_IDEEditorBasicMode, DVTControllerContentView_ControlledBy_IDEEditorContext, DVTControllerContentView_ControlledBy_IDEEditorEmpty, DVTControllerContentView_ControlledBy_IDEInspectorViewController, DVTControllerContentView_ControlledBy_IDEPlaygroundDebugArea, DVTControllerContentView_ControlledBy_IDEPlaygroundEditor, DVTControllerContentView_ControlledBy_IDESourceCodeEditor, DVTControllerContentView_ControlledBy_IDESourceCodePlaygroundSectionAnnotationViewController, DVTControllerContentView_ControlledBy_IDESourceCodePlaygroundSectionViewController, DVTControllerContentView_ControlledBy_IDETextSettingsContainerInspectorController, DVTControllerContentView_ControlledBy_IDEVariablesView, DVTControllerContentView_ControlledBy_IDEWorkspaceTabController, DVTControllerContentView_ControlledBy_Xcode3TargetMembershipInspector, DVTDelayedMenuButton, DVTDelayedMenuGradientImageButton, DVTFilePathField, DVTGradientImageButton, DVTGradientImagePopUpButton, DVTGroupedTileView, DVTLayoutView_ML, DVTLozengeTextField, DVTMarkedScroller, DVTMessageBubbleView, DVTReplacementView, DVTRolloverImageButton, DVTScopeBarButton, DVTScopeBarView, DVTScrollView, DVTScrollView_ControlledBy_IDEStructureNavigator, DVTScrollableTabBarClipView, DVTScrollableTabBarView, DVTScrollableTabBarViewAccessoryButton, DVTScrollableTabButton, DVTSearchField, DVTSegmentedControl, DVTSourceTextScrollView, DVTSourceTextView, DVTSplitView, DVTStepperTextField, DVTTabBarEnclosureView, DVTTableCellViewMultiLine, DVTTableCellViewOneLine, DVTTableCellViewVibrantView, DVTTableRowView, DVTTableView, DVTTextSidebarView, IDEActionButton, IDEActivityView, IDEActivityViewBackgroundButton, IDEConsoleTextView, IDEControlGroup, IDEDebugAreaBorderedView, IDEEditorMenuStepperView, IDEFirstResponderView, IDEInspectorContentView, IDEInspectorResizableTextField, IDENavBar, IDENavigatorFilterControlBar, IDENavigatorOutlineView, IDENavigatorSCMStatusTextField, IDEPathControl, IDEPlaygroundSourceTextScrollView, IDEPlaygroundTextView, IDERunPauseContinueToolbarButton, IDESchemeToolbarBorderView, IDESourceCodeEditorContainerView, IDESourceCodePlaygroundSectionContainerView, IDEUtilityAreaDVTStackView_ML, IDEUtilityDisclosureHeaderView, IDEUtilityDisclosureView, IDEUtilityPlaceholderView, IDEVariablesViewOutlineView, InvisibleScroller, NSBox, NSButton, NSButtonTextField, NSClipView, NSColorPanelColorWell, NSColorPanelResizeDimple, NSColorPickerColorSpacePopUp, NSColorPickerSelectingTextField, NSColorScaleSlider, NSColorSwatch, NSImageView, NSMatrix, NSPopUpButton, NSProgressIndicator, NSScrollView, NSScroller, NSSlider, NSStepper, NSTabView, NSTextField, NSThemeFrame, NSTitlebarContainerView, NSTitlebarView, NSTokenField, NSToolbarBaselineView, NSToolbarButton, NSToolbarClippedItemsIndicator, NSToolbarItemViewer, NSView, NSView_ControlledBy_IDEInspectorArea, NSView_ControlledBy_IDEIssueNavigator, NSView_ControlledBy_IDELibraryArea, NSView_ControlledBy_SKEObjectLibraryController, NSVisualEffectView, NSVisualEffectView_ControlledBy_IDENavigatorArea, ScrollableTabBarMaskingContainerView, Xcode3EmbeddedScrollView, Xcode3TargetMembershipInspectorContentView, _DVTActionPullDownButton, _DVTScrollViewSeparatorView, _DVTTableCellViewEditableTextField, _DVTTableCellViewImageView, _DVTTableCellViewTextField, _IDEEditorStepperArrowButton, _IDESourceCodePlaygroundSectionAnnotationView, _IDESwipeAnimationHostView, _NSClipViewOverhangView, _NSThemeCloseWidget, _NSThemeWidget, _NSThemeZoomWidget, _NSToolbarFlexibleSpace, _NSToolbarViewClipView, nil
      @"NSWindowBackgroundGradientDidChangeNotification",    // object = NSColorPanel
      @"NSWindowDidBecomeKeyNotification",    // object = IDEWorkspaceWindow
      @"NSWindowDidBecomeMainNotification",    // object = IDEWorkspaceWindow
      @"NSWindowDidChangeBackingPropertiesNotification",    // object = NSCarbonMenuWindow
      @"NSWindowDidChangeOcclusionStateNotification",    // object = IDEWorkspaceWindow, NSWindow
      @"NSWindowDidChangeResolutionNotification",    // object = NSCarbonMenuWindow
      @"NSWindowDidChangeScreenNotification",    // object = IDEWorkspaceWindow
      @"NSWindowDidCloseNotification",    // object = DVTTextCompletionWindow, NSWindow
      @"NSWindowDidMoveNotification",    // object = IDEWorkspaceWindow
      @"NSWindowDidOrderOffScreenAndFinishAnimatingNotification",    // object = DVTTextCompletionWindow, NSWindow
      @"NSWindowDidOrderOffScreenNotification",    // object = DVTTextCompletionWindow, NSWindow
      @"NSWindowDidOrderOnScreenAndFinishAnimatingNotification",    // object = IDEWorkspaceWindow
      @"NSWindowDidResignKeyNotification",    // object = IDEWorkspaceWindow
      @"NSWindowDidResignMainNotification",    // object = IDEWorkspaceWindow
      @"NSWindowDidResizeNotification",    // object = IDEWorkspaceWindow, NSColorPanel
      @"NSWindowDidUpdateNotification",    // object = IDEWorkspaceWindow
      @"NSWindowWillCloseNotification",    // object = DVTTextCompletionWindow, NSWindow
      @"NSWindowWillMoveNotification",    // object = IDEWorkspaceWindow
      @"NSWindowWillOrderOffScreenNotification",    // object = DVTTextCompletionWindow, NSWindow
      @"PBXProjectDidOpenNotification",    // object = PBXProject
      @"PBXTargetBuildSettingsDidChangeNotification",    // object = PBXNativeTarget
      @"PBXTargetProductReferenceDidChangeNotification",    // object = PBXNativeTarget
      @"PBXUnarchiverDidFinishUnarchivingNotification",    // object = PBXPListUnarchiver
      @"XCBuildContextDidCreateDependencyGraphNotification",    // object = nil
      @"XCBuildContextDidFinishSettingTargetSnapshotNotification",    // object = nil
      @"XCProfileChangeEventNotification",    // object = nil
      @"XCPropertyInfoContext_DictionaryWasAdded",    // object = XCPropertyInfoContext
      @"XCPropertyInfoContext_WillBeDiscardedNotification",    // object = XCPropertyInfoContext
      @"_NSPersistentStoreCoordinatorStoresDidChangePrivateNotification",    // object = NSPersistentStoreCoordinator
      @"_NSSQLCoreTransactionStateChangeNotification",    // object = NSSQLCore
      @"_NSThreadDidStartNotification",    // object = NSThread
      @"_NSWindowDidBecomeVisible",    // object = IDEWorkspaceWindow
      @"_NSWindowDidChangeWindowNumber",    // object = IDEWorkspaceWindow, NSColorPanel, NSWindow
      @"_NSWindowWillBecomeVisible",    // object = IDEWorkspaceWindow
      @"_NSWindowWillChangeWindowNumber",    // object = IDEWorkspaceWindow, NSColorPanel, NSWindow
      @"kC3DNotificationEngineContextInvalidatePasses",    // object = nil
      @"kNotificationGeometryWillDie",    // object = C3DGeometry
      @"kNotificationMeshSourceWillDie",    // object = nil
      @"kNotificationMeshWillDie",    // object = nil
      ];
              
    for (NSString* ignoreName in ignoreNames)
    {
        if ([sender.name isEqualToString:ignoreName])
        {
            return;
        }
    }
       
    NSLog(@"Receive : %@", sender);
}