presentMultiSeatDataSharingConsentSheet(from:subscriptionGroupID:)
Presents the sheet in which the group purchaser decides whether to share group information with you.
Declaration
@MainActor static func presentMultiSeatDataSharingConsentSheet(from controller: UIViewController, subscriptionGroupID: String) async throwsParameters
- controller:
The view controller that StoreKit uses to present the sheet. The view controller needs to be in a window hierarchy.
- subscriptionGroupID:
The identifier of the subscription group for which you’re requesting consent.
Mentioned in
Discussion
Discussion
Use this method to ask the group purchaser of a multiseat subscription whether to share group information, the membership of their group, with you. Data sharing consent applies only to subscriptions that use Apple-hosted invitations. While the group purchaser shares group information, the group appears in the responses from Get Customer Groups and Get Group Members in the App Store Server API. The group purchaser can change the choice at any time in Manage Subscriptions.
Each time before you present the sheet, check multiSeatDataSharingConsentEligibility, and present the sheet only if the value is Product.SubscriptionInfo.MultiSeatDataSharingConsentEligibility.eligible.
The App Store records the choice and doesn’t return it to your app. The method returns after the group purchaser dismisses the sheet, whatever choice they make. To present the sheet in SwiftUI, use the multiSeatDataSharingConsentSheet(isPresented:subscriptionGroupID:onCompletion:) view modifier.
For more information, see Supporting multiseat purchases in your app.