<!--
{
  "availability" : [
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/invokeDefaultMethod(withArguments:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Objective-C Runtime",
      "ObjectiveC"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(im)invokeDefaultMethodWithArguments:"
  },
  "title" : "invokeDefaultMethod(withArguments:)"
}
-->

# invokeDefaultMethod(withArguments:)

Executes when a script attempts to invoke a method on an exposed object directly.

```
func invokeDefaultMethod(withArguments arguments: [Any]!) -> Any!
```

## Parameters

`arguments`

The arguments to be passed to the default method.

## Return Value

The result of invoking the default method.

## Discussion

---

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)