<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSXPCInterface/classes(for:argumentIndex:ofReply:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSXPCInterface(im)classesForSelector:argumentIndex:ofReply:"
  },
  "title" : "classes(for:argumentIndex:ofReply:)"
}
-->

# classes(for:argumentIndex:ofReply:)

Returns the current list of allowed classes that can appear within the specified collection object argument to the specified method.

```
func classes(for sel: Selector, argumentIndex arg: Int, ofReply: Bool) -> Set<AnyHashable>
```

## Parameters

`sel`

Specifies which method in the protocol you want information about.

`arg`

Specifies the position (starting at index 0) of the parameter for which you want to obtain the current set of allowed classes. This may be either the position of a parameter in the method itself or the position in its reply block.

`ofReply`

Pass <doc://com.apple.documentation/documentation/Swift/true> if `arg` is an index into the parameters of the reply block, or <doc://com.apple.documentation/documentation/Swift/false> if it is an index into the parameters of the method itself.

## Discussion

See [`setClasses(_:for:argumentIndex:ofReply:)`](/documentation/Foundation/NSXPCInterface/setClasses(_:for:argumentIndex:ofReply:)) for more explanation.

## See Also

  [Daemons and Services Programming Guide](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html#//apple_ref/doc/uid/10000172i)



---

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)