Community-maintained Agent Skills for complete Swift and Apple-platform app delivery.
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Medium
Suggest reviewing before use
Use this reference for subscription-store presentation, introductory, promotional, win-back, and offer-code flows. Eligibility is a verified state, not a reason to show every raw offer returned by StoreKit.
ProductView for one product, StoreView for a collection, and
SubscriptionStoreView for one subscription group..storeButton(.visible, for: .redeemCode) or
.offerCodeRedemption(isPresented:) for a user-initiated code path.Check introductory eligibility and verified renewal information before showing promotional or win-back choices. Pass the selected offer through the current StoreKit 2 purchase option; do not invent legacy offer fields.
let eligibleIDs = statuses.flatMap { status -> [String] in
guard case .verified(let renewalInfo) = status.renewalInfo else { return [] }
return renewalInfo.eligibleWinBackOfferIDs
}
let eligibleOffers = winBackOffers.filter { offer in
guard let id = offer.id else { return false }
return eligibleIDs.contains(id)
}
if let offer = eligibleOffers.first {
let result = try await product.purchase(options: [.winBackOffer(offer)])
// Verify and fulfill the resulting transaction before finish.
}Promotional offers require the server-signed offer data expected by the supported SDK. An introductory offer is applied automatically when the user is eligible; it is not a separate arbitrary purchase option.
Test the user-facing redemption UI separately from the StoreKit Test API. In an
Xcode StoreKit Test target, use the configured reference name with
SKTestSession.buyProduct(identifier:options:); do not paste that test-only API
into production purchase code.
// Production/UI surface
.storeButton(.visible, for: .redeemCode)
// StoreKit Test target only
try await testSession.buyProduct(
identifier: product.id,
options: [.codeOffer(referenceName: "SUMMER2024")]
)After redemption, verify the transaction and inspect
transaction.offer?.type == .code and the expected transaction.offer?.id.
For full view customization and server signing examples, read storekit-advanced-complete.md.
.tessl-plugin
skills
accessorysetupkit
references
activitykit
adattributionkit
references
alarmkit
references
app-clips
app-intents
app-store-optimization
app-store-review
apple-on-device-ai
appmigrationkit
audioaccessorykit
references
authentication
references
avfoundation-audio
references
avkit
background-processing
references
browserenginekit
callkit
references
carplay
cloudkit
contacts-framework
references
core-bluetooth
references
core-data
core-haptics
references
core-motion
references
core-nfc
references
coreml
references
cryptokit
cryptotokenkit
debugging-instruments
device-integrity
references
energykit
references
eventkit
family-controls
references
financekit
focus-engine
gamekit
git-branching-workflow
references
healthkit
references
homekit
references
ios-accessibility
ios-app-workflow
references
ios-ettrace-performance
ios-localization
ios-memgraph-analysis
ios-networking
ios-simulator
references
metrickit
references
musickit
references
natural-language
paperkit
references
passkit
references
pdfkit
pencilkit
references
permissionkit
references
photokit
push-notifications
quicklook
references
realitykit
references
relevancekit
references
scenekit
sensorkit
shazamkit
references
speech-recognition
references
spritekit
storekit
swift-api-design-guidelines
swift-architecture
references
swift-charts
swift-codable
references
swift-code-review
swift-concurrency
swift-formatstyle
references
swift-language
swift-security
references
swift-testing
swiftdata
swiftlint
swiftui-animation
swiftui-gestures
references
swiftui-layout-components
swiftui-liquid-glass
references
swiftui-patterns
swiftui-performance
swiftui-responsive-layout
swiftui-uikit-interop
swiftui-webkit
tabletopkit
tipkit
vision-framework
weatherkit
references