---
title: "functionNames(completionHandler:)"
framework: coreml
role: symbol
role_heading: Instance Method
path: "coreml/mlmodelasset/functionnames(completionhandler:)"
---

# functionNames(completionHandler:)

The list of function names in the model asset.

## Declaration

```swift
func functionNames(completionHandler handler: @escaping @Sendable ([String]?, (any Error)?) -> Void)
```

```swift
var functionNames: [String] { get async throws }
```

## Discussion

Discussion Some model types (e.g. ML Program) supports multiple functions. Use this method to query the function names. The method vends the empty array when the model doesn’t use the multi-function configuration. let modelAsset = try MLModelAsset(url: modelURL) let functionNames = try await modelAsset.functionNames print(functionNames) // For example, ["my_function1", "my_function2"];
