appAccountToken in SubscriptionStoreView

Hello!

How can I set appAccountToken when I'm using the new SwiftUI view SubscriptionStoreView for subscription?

Previously I was able to set it as a purchase option here https://developer.apple.com/documentation/storekit/product/purchase(options:) but I don't see purchase options with SubscriptionStoreView.

Thank you, sendai

Answered by wsendai in 826185022

Found it, we can use inAppPurchaseOptions..

For example:

SubscriptionStoreView(groupID: "XXXXXX") {
}
.inAppPurchaseOptions {
    product in
    [
        Product.PurchaseOption.appAccountToken(UUID())
    ]
}

Tested, it works.

Accepted Answer

Found it, we can use inAppPurchaseOptions..

For example:

SubscriptionStoreView(groupID: "XXXXXX") {
}
.inAppPurchaseOptions {
    product in
    [
        Product.PurchaseOption.appAccountToken(UUID())
    ]
}

Tested, it works.

appAccountToken in SubscriptionStoreView
 
 
Q