<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/subscriptionStorePolicyDestination(url:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewP010_StoreKit_aB0E012subscriptionD17PolicyDestination3url3forQr10Foundation3URLV_AD012SubscriptiondG4KindVtF"
  },
  "title" : "subscriptionStorePolicyDestination(url:for:)"
}
-->

# subscriptionStorePolicyDestination(url:for:)

Configures a URL as the destination for a policy button action in subscription store views.

```
nonisolated func subscriptionStorePolicyDestination(url: URL, for button: SubscriptionStorePolicyKind) -> some View
```

## Parameters

`url`

The URL of the web page to open when someone chooses to view the policy.

`button`

The policy button to associate the URL with.

## Discussion

You can also set a view as the destination using
[`subscriptionStorePolicyDestination(for:destination:)`](/documentation/SwiftUI/View/subscriptionStorePolicyDestination(for:destination:)). If you do not set
a destination, or pass `nil` for `url`, the system will use the automatic behavior. Check the
documentation for the value you provide for `button` to understand the automatic behavior.

By default, the subscription store shows the terms of service & privacy policy buttons if you
set a destination for at least one policy. The policy that is not explicitly set will use the automatic
behavior. You can override this behavior using the
[`storeButton(_:for:)`](/documentation/SwiftUI/View/storeButton(_:for:)) modifier, with
<doc://com.apple.documentation/documentation/StoreKit/StoreButtonKind/policies>
as the second parameter.

---

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)