<!--
{
  "availability" : [
    "tvOS: 9.0.0 - 18.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "TVMLKit",
  "identifier" : "/documentation/TVMLKit/TVInterfaceCreating/resourceURL(name:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "TVMLKit"
    ],
    "preciseIdentifier" : "c:objc(pl)TVInterfaceCreating(im)URLForResource:"
  },
  "title" : "resourceURL(name:)"
}
-->

# resourceURL(name:)

Returns a URL for the given resource.

```
optional func resourceURL(name resourceName: String) -> URL?
```

## Parameters

`resourceName`

A string that contains the name of the resource.

## Return Value

The URL associated with the resource name. The app must return `nil` if the event is not handled.

## Discussion

The `resourceName` parameter comes from a resource URL specified in certain elements. For example, `badge src="resource://developer-resource">` contains the resource name, `developer-resource`.

---

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)