Skip to content

v2.10.0

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Nov 18:19
· 0 commits to main since this release

Full Changelog: https://github.com/jaywcjlove/StoreKitHelper/commits/v2.10.0

Features

Multi-seat subscriptions

An auto-renewable subscription can be bought for a group on the same product ID. seats is the total number of seats after the purchase, including the purchaser, up to 100. To add seats, pass the new total. A smaller total is rejected. The purchaser reduces seats in subscription settings, and that change takes effect at the next renewal.

let tiers = [
    MultiSeatPriceTier(minimumSeats: 1, maximumSeats: 5, pricePerSeat: Decimal(string: "9.99")!),
    MultiSeatPriceTier(minimumSeats: 6, maximumSeats: 10, pricePerSeat: Decimal(string: "7.99")!),
]
let total = product.formattedMultiSeatTotal(seatCount: 8, tiers: tiers)

await store.purchase(product, seats: 8)
let seats = store.activeSeatCount(for: product.id)
store.presentMultiSeatManagement()

Seats fill the most expensive tier first. StoreKit does not return a group total, so MultiSeatPurchase.quote and formattedMultiSeatTotal add the tiers and format the result with the product's price style.

multiSeatGrants records the active seat count, refunded seats, invitation model, original transaction ID, and the seat count at the next renewal. Access still comes from each person's own transaction: the purchaser, members invited by Apple, and people assigned a seat by an organization. A partial seat refund lowers the seat count and leaves the product entitled. Members invited through a developer-hosted flow have no App Store transaction, so they are not in that map.

purchase(_:seats:) calls Product.PurchaseOption.seats(_:). That symbol ships with the Xcode 27.3 SDK and is back-deployed to the system purchase flow. A build made with an earlier SDK reports StoreKitError.multiSeatPurchaseUnavailable and does not fall back to buying a single seat. Quotes and entitlement tracking do not need that symbol. Group purchases can be started on iPhone, iPad, and Mac. presentMultiSeatManagement() opens the system subscription settings page for seat reductions and later invitations. The default product list still purchases one seat.