<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSURL/resourceValues(forKeys:fromBookmarkData:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSURL(cm)resourceValuesForKeys:fromBookmarkData:"
  },
  "title" : "resourceValues(forKeys:fromBookmarkData:)"
}
-->

# resourceValues(forKeys:fromBookmarkData:)

Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data.

```
class func resourceValues(forKeys keys: [URLResourceKey], fromBookmarkData bookmarkData: Data) -> [URLResourceKey : Any]?
```

## Parameters

`keys`

An array of names of URL resource properties. In addition to the standard, system-defined resource properties, you can also request any custom properties that you provided when you created the bookmark. See the [`bookmarkData(options:includingResourceValuesForKeys:relativeTo:)`](/documentation/Foundation/NSURL/bookmarkData(options:includingResourceValuesForKeys:relativeTo:)) method for details.

`bookmarkData`

The bookmark data from which you want to retrieve resource values.

## Return Value

A dictionary of the requested resource values contained in `bookmarkData`.

## See Also

[`URLResourceKey`](/documentation/Foundation/URLResourceKey)

Keys that apply to file system URLs.



---

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)