<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URL/init(resolvingAliasFileAt:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation3URLV20resolvingAliasFileAt7optionsA2Ch_So30NSURLBookmarkResolutionOptionsVtKcfc"
  },
  "title" : "init(resolvingAliasFileAt:options:)"
}
-->

# init(resolvingAliasFileAt:options:)

Creates a URL that refers to the location specified by resolving an alias file.

```
init(resolvingAliasFileAt url: URL, options: URL.BookmarkResolutionOptions = []) throws
```

## Discussion

If the `url` argument doesn’t refer to an alias file (as defined by the [`isAliasFileKey`](/documentation/Foundation/URLResourceKey/isAliasFileKey) property), the returned URL is the same as the `url` argument.

This method throws an error in the following cases:

- The url argument is unreachable.
- The original file or directory is unknown or unreachable.
- The original file or directory is on a volume that the system can’t locate or can’t mount.

This method doesn’t support the [`withSecurityScope`](/documentation/Foundation/NSURL/BookmarkResolutionOptions/withSecurityScope) option.

---

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)