<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileHandle/readCompletionNotification",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@NSFileHandleReadCompletionNotification"
  },
  "title" : "readCompletionNotification"
}
-->

# readCompletionNotification

Posted when the file handle reads the data currently available in a file or at a communications channel.

```
class let readCompletionNotification: NSNotification.Name
```

## Discussion

It makes the data available to observers by putting it in the `userInfo` dictionary. To cause the posting of this notification, you must send either [`readInBackgroundAndNotify()`](/documentation/Foundation/FileHandle/readInBackgroundAndNotify()) or [`readInBackgroundAndNotify(forModes:)`](/documentation/Foundation/FileHandle/readInBackgroundAndNotify(forModes:)) to an appropriate `NSFileHandle` object.

The notification object is the `NSFileHandle` object that sent the notification. The `userInfo` dictionary contains the following information:

|Key                               |Value                                                                                      |
|----------------------------------|-------------------------------------------------------------------------------------------|
|`NSFileHandleNotificationDataItem`|An `NSData` object containing the available data read from a socket connection.            |
|`@"NSFileHandleError"`            |An `NSNumber` object containing an integer representing the UNIX-type error which occurred.|

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)