<!--
{
  "availability" : [
    "iOS: 26.2.0 -",
    "iPadOS: 26.2.0 -",
    "macCatalyst: 26.2.0 -",
    "macOS: 26.2.0 -",
    "visionOS: 26.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASAutoFillURLScope/init(url:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "s:22AuthenticationServices18ASAutoFillURLScopeV3urlACSg10Foundation3URLV_tcfc"
  },
  "title" : "init(url:)"
}
-->

# init(url:)

Initialize with the components of a URL.

```
init?(url: URL)
```

## Parameters

`url`

The URL to expand.

## Discussion

If the url string from the URL is malformed, nil is returned.

---

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)