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

# subscriptionStoreSignInAction(_:)

Adds an action to perform when a person uses the sign-in button on a subscription store view within a view.

```
nonisolated func subscriptionStoreSignInAction(_ action: (() -> ())?) -> some View
```

## Parameters

`action`

The action to perform. Pass `nil` to remove the sign in action for
subscription stores within this view. The default value is `nil`.

## Discussion

You can only have one sign in action for a view. If an ancestor view specifies a sign in action, using
this modifier will replace the ancestor’s sign in action.

If the value is `nil`, subscription stores will never show a sign in button. You can also hide the
sign in button without removing the action by using the [`storeButton(_:for:)`](/documentation/SwiftUI/View/storeButton(_:for:))
modifier, providing <doc://com.apple.documentation/documentation/StoreKit/StoreButtonKind/signIn>
as the button kind.

---

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)