Created
February 7, 2025 06:29
-
-
Save thebusby/72c51970c971ef4b725f754707edf5e6 to your computer and use it in GitHub Desktop.
An example of how to use an appAccountToken with a SubscriptionStoreView
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SubscriptionStoreView(groupID: INAPP_SUBSCRIPTION_GROUP_ID) { | |
// View goes here | |
} | |
.inAppPurchaseOptions({ product in | |
var options: Set<Product.PurchaseOption> = [] | |
let appAccountToken = UUID() // Create one, or get from another source | |
options.insert( .appAccountToken(appAccountToken) ) | |
return options | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Being new to iOS development, I'm assuming that I'm missing something here; but for the life of me I had a horrific time figuring out how to use an appAccountToken with a SubscriptionStoreView in iOS's StoreKit. I can just send my user's UUID in the purchase transaction, and have my server handle everything independently on the back end. Why wouldn't I want to do that?