Generates StoreKit 2 code for all subscription offer types — introductory, promotional, offer codes, and win-back. Includes eligibility checks, offer presentation, and the preferredSubscriptionOffer modifier. Use when adding subscription offers, free trials, or promotional pricing.
7k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
585
stars on the repo
on the repository, not the skill itself
Install
one command, takes just this skill from the repository
Generate complete StoreKit 2 implementation for all four subscription offer types with eligibility verification, offer presentation, and transaction handling.
When This Skill Activates
Use this skill when the user:
Asks to "add subscription offers" or "set up free trial"
Mentions "introductory offer", "promotional offer", or "offer codes"
Wants "StoreKit 2 offers" implementation
Asks about "subscription pricing" or "discounted subscription"
Mentions "preferredSubscriptionOffer" or "eligibility check"
Pre-Generation Checks
1. Project Context Detection
[ ] Check for existing StoreKit implementations (import StoreKit)
[ ] Check deployment target (iOS 16.4+ for SubscriptionStoreView offers, iOS 15+ for manual)
[ ] Look for existing product/subscription group IDs
[ ] Identify if paywall-generator was already used
2. Conflict Detection
Glob: **/*Offer*.swift, **/*Eligibility*.swift
Grep: "introductoryOffer" or "promotionalOffers" or "winBackOffers"
If existing offer code found, ask:
Extend with additional offer types?
Replace existing implementation?
Offer Types Reference
1. Introductory Offers
Who: New subscribers who haven't previously subscribed
Who: Current or lapsed subscribers. Baseline eligibility is deliberately broad — any current or lapsed subscriber of *any* subscription in the app, even mid-intro — so layer YOUR business rules on top
Types: Free, pay-as-you-go, pay-up-front (pay-up-front prices are deliberately NOT price-validated — this is what enables bundle-style pricing)
Limit: Up to 10 active offers per subscription
Requires: Server-side signature generation — sign server-side only; signatures are valid 24 hours, so generate just before display
| 3 days | Photo/video, games, utilities, business |
…and regional norms: monthly trials dominate in the US/Canada/Europe/Australia/NZ; 7-day in Greater China/Japan/Latin America; 3-day in Southeast Asia and EMEA.
Annual pricing: ~33% off the effective monthly rate is the cited pattern — "12 months for the price of 8".
Reduce trial anxiety: show an in-app countdown of trial days remaining and offer an opt-in push reminder before the trial converts.
❌ Never hard-code offer merchandising ("Try 1 week free") — check isEligibleForIntroOffer and render only offers the user can actually redeem.
The Six Churn Playbooks (WWDC19 — still the strategy canon)
let manager = SubscriptionOfferManager()
let isEligible = await manager.isEligibleForIntroOffer(
productID: "com.app.subscription.monthly"
)
Present Best Available Offer:
// Automatically selects the best offer for the user's state
let offer = await manager.bestAvailableOffer(
for: "com.app.subscription.monthly"
)
// Use with SubscriptionStoreView (iOS 16.4+)
SubscriptionStoreView(groupID: groupID)
.preferredSubscriptionOffer(offer)