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

# Deprecated symbols

Review symbols that are no longer in active development, and their recommended replacements.

## Overview

Although these symbols are available for use, Apple is no longer actively developing them, and may remove them in a future release. Apple recommends moving away from these symbols and using their indicated replacements instead. Check the individual symbol pages for the recommended replacements.

## Topics

### Deprecated methods

[`- (BOOL) hasMarkedText;`](/documentation/AppKit/NSTextInput/hasMarkedText)

Returns a Boolean value indicating whether or not the receiver has marked text.

[`- (NSRange) markedRange;`](/documentation/AppKit/NSTextInput/markedRange)

Returns the range of the marked text.

[`- (NSRange) selectedRange;`](/documentation/AppKit/NSTextInput/selectedRange)

Returns the range of selected text.

[`- (void) setMarkedText:(id) string selectedRange:(NSRange) selRange;`](/documentation/AppKit/NSTextInput/setMarkedText:selectedRange:)

Replaces currently marked text in the receiver’s text storage with the given string and sets the selection to the given range, computed from the beginning of the marked text.

[`- (void) unmarkText;`](/documentation/AppKit/NSTextInput/unmarkText)

Removes any marking from pending input text and disposes of the marked text as it wishes. The text view should accept the marked text as if it had been inserted normally.

[`- (NSArray *) validAttributesForMarkedText;`](/documentation/AppKit/NSTextInput/validAttributesForMarkedText)

Returns an array of names for the attributes supported by the receiver.

[`- (NSAttributedString *) attributedSubstringFromRange:(NSRange) range;`](/documentation/AppKit/NSTextInput/attributedSubstringFromRange:)

Returns an attributed string derived from the given range in the receiver’s text storage.

[`- (void) insertText:(id) string;`](/documentation/AppKit/NSTextInput/insertText:)

Inserts the given string into the receiver’s text storage.

[`- (NSUInteger) characterIndexForPoint:(NSPoint) point;`](/documentation/AppKit/NSTextInput/characterIndexForPoint:)

Returns the index of the character whose frame rectangle includes the given point.

[`- (NSRect) firstRectForCharacterRange:(NSRange) range;`](/documentation/AppKit/NSTextInput/firstRectForCharacterRange:)

Returns the first frame rectangle for characters in the given range, in screen coordinates.

[`- (void) doCommandBySelector:(SEL) selector;`](/documentation/AppKit/NSTextInput/doCommandBySelector:)

Invokes the given selector if possible.

[`- (NSInteger) conversationIdentifier;`](/documentation/AppKit/NSTextInput/conversationIdentifier)

Returns a number used to identify the receiver’s context to the input server.



---

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)