<!--
{
  "documentType" : "article",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/deprecated-symbols",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Deprecated Symbols"
}
-->

# Deprecated Symbols

Migrate your code away from using these symbols.

## Topics

### Deprecated Initializers

[`init?(path: String, documentAttributes: AutoreleasingUnsafeMutablePointer<NSDictionary?>?)`](/documentation/Foundation/NSAttributedString/init(path:documentAttributes:))

Initializes a new attribute string object from RTF or RTFD data in the file at the specified path.

[`init?(URL: URL, documentAttributes: AutoreleasingUnsafeMutablePointer<NSDictionary?>?)`](/documentation/Foundation/NSAttributedString/init(URL:documentAttributes:))

Initializes a new attributed string object from the data at the specified URL.

[`init(fileURL: URL, options: [AnyHashable : Any], documentAttributes: AutoreleasingUnsafeMutablePointer<NSDictionary?>?) throws`](/documentation/Foundation/NSAttributedString/init(fileURL:options:documentAttributes:))

Initializes a new attributed string object from the data at the specified URL.

### Deprecated Properties

[`+ (NSArray *) textFileTypes;`](/documentation/Foundation/NSAttributedString/textFileTypes)

Returns an array of strings that represent file types that can be loaded as text.

[`+ (NSArray *) textUnfilteredFileTypes;`](/documentation/Foundation/NSAttributedString/textUnfilteredFileTypes)

Returns an array of strings that represent file types that can be loaded as a text.

[`+ (NSArray *) textPasteboardTypes;`](/documentation/Foundation/NSAttributedString/textPasteboardTypes)

Returns an array of pasteboard types that can be loaded as text.

[`+ (NSArray *) textUnfilteredPasteboardTypes;`](/documentation/Foundation/NSAttributedString/textUnfilteredPasteboardTypes)

Returns an array of pasteboard types that can be loaded as text.

[`var containsAttachments: Bool`](/documentation/Foundation/NSAttributedString/containsAttachments)

A Boolean value that indicates whether the attribute string contains any attachment attributes.

### Deprecated Enumerations

  <doc://com.apple.documentation/documentation/UIKit/NSTextWritingDirection>

### Deprecated Constants

  <doc://com.apple.documentation/documentation/AppKit/NSUnderlineByWordMask>

  <doc://com.apple.documentation/documentation/AppKit/NSUnderlineStrikethroughMask>

### Deprecated Instance Methods

[`func url(at: Int, effectiveRange: NSRangePointer) -> URL?`](/documentation/Foundation/NSAttributedString/url(at:effectiveRange:))

Returns a URL, either from a link attribute or from text at the specified location that appears to be a URL string, for use in automatic link detection.

[`func draw(with: NSRect, options: NSString.DrawingOptions)`](/documentation/Foundation/NSAttributedString/draw(with:options:))

Draws the attributed string with the specified options within the specified rectangle in the current graphics context.

[`func boundingRect(with: NSSize, options: NSString.DrawingOptions) -> NSRect`](/documentation/Foundation/NSAttributedString/boundingRect(with:options:))

Calculates and returns a bounding rectangle for the attributed string using the options specified within the specified rectangle in the current graphics context.



---

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)