Contents

subscriptionStoreSignInAction(_:)

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

Declaration

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:) modifier, providing signIn as the button kind.

See Also

Interacting with the App Store and Apple Music