-
What’s new in StoreKit and In-App Purchase
Learn how to build and deliver even better purchase experiences using the App Store In-App Purchase system. We'll demo new StoreKit views control styles and new APIs to improve your subscription customization, discuss new fields for transaction-level information, and explore new testability in Xcode. We'll also review an important StoreKit deprecation.
Capítulos
- 0:00 - Introduction
- 0:36 - Core API enhancements
- 3:12 - Merchandise using SwiftUI
- 15:35 - Test in Xcode
- 21:06 - Update to StoreKit 2
Recursos
- Testing in-app purchases with StoreKit transaction manager in Xcode
- Product.SubscriptionInfo.RenewalInfo
- Transaction properties
- Forum: App Store Distribution & Marketing
- Message
- StoreKit views
- Introducing StoreKit 2
- Setting up StoreKit Testing in Xcode
- In-App Purchase
- Original API for In-App Purchase
Vídeos relacionados
WWDC24
WWDC23
WWDC22
WWDC21
WWDC20
-
Buscar neste vídeo...
-
-
4:26 - Destination Video Shop
import StoreKit import SwiftUI struct DestinationVideoShop: View { var body: some View { SubscriptionStoreView(groupID: Self.subscriptionGroupID) { SubscriptionOptionGroupSet { product in StreamingPassLevel(product) } label: { streamingPassLevel in Text(streamingPassLevel.localizedTitle) } marketingContent: { streamingPassLevel in StreamingPassMarketingContent(level: streamingPassLevel) StreamingPassFeatures(level: streamingPassLevel) } } .subscriptionStoreControlStyle(.compactPicker, placement: .bottomBar) } } -
9:06 - Subscription Option Groups - Tabs style
SubscriptionStoreView(groupID: Self.subscriptionGroupID) { SubscriptionOptionGroupSet { product in StreamingPassLevel(product) } label: { streamingPassLevel in Text(streamingPassLevel.localizedTitle) } marketingContent: { _ in StreamingPassMarketingContent() } } .subscriptionStoreControlStyle(.compactPicker, placement: .bottomBar) .subscriptionStoreOptionGroupStyle(.tabs) -
9:20 - Subscription Option Groups - Links style
SubscriptionStoreView(groupID: Self.subscriptionGroupID) { SubscriptionOptionGroupSet { product in StreamingPassLevel(product) } label: { streamingPassLevel in Text(streamingPassLevel.localizedTitle) } marketingContent: { _ in StreamingPassMarketingContent() } } .subscriptionStoreControlStyle(.compactPicker, placement: .bottomBar) .subscriptionStoreOptionGroupStyle(.links) -
13:41 - Custom control style implementation
import StoreKit import SwiftUI struct BadgedPickerControlStyle: SubscriptionStoreControlStyle { func makeBody(configuration: Configuration) -> some View { SubscriptionPicker(configuration) { pickerOption in HStack(alignment: .top) { VStack(alignment: .leading) { Text(pickerOption.displayName) .font(title2.bold()) Text(priceDisplay(for: pickerOption)) if pickerOption.isFamilyShareable { FamilyShareableBadge() } Text(pickerOption.description) } Spacer() SelectionIndicator(pickerOption.isSelected) } } confirmation: { option in SubscribeButton(option) } } } struct DestinationVideoShop: View { var body: some View { SubscriptionStoreView(groupID: Self.subscriptionGroupID) { SubscriptionPeriodGroupSet { _ in StreamingPassMarketingContent() } } .subscriptionStoreControlStyle(BadgedPickerControlStyle()) } }
-