---
title: shared
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nsdocumentcontroller/shared
---

# shared

Returns the shared NSDocumentController instance.

## Declaration

```swift
class var shared: NSDocumentController { get }
```

## Return Value

Return Value The shared NSDocumentController instance.

## Discussion

Discussion If an NSDocumentController instance doesn’t exist yet, it is created. Initialization reads in the document types from the CFBundleDocumentTypes property list (in Info.plist), registers the instance for willPowerOffNotifications, and turns on the flag indicating that document user interfaces should be visible. You should always obtain your application’s NSDocumentController using this method.

## See Also

### Related Documentation

- [Document-Based App Programming Guide for Mac](apple-archive/documentation/DataManagement/Conceptual/DocBasedAppProgrammingGuideForOSX/Introduction.md)
