ios-paywall-creator 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/QUICKSTART.md +185 -0
- package/README.md +233 -0
- package/SKILL.md +679 -0
- package/bin/install.js +203 -0
- package/bin/postinstall.js +40 -0
- package/examples/iap-credits-example.md +216 -0
- package/examples/subscription-app-example.md +168 -0
- package/package.json +50 -0
- package/references/paywall-ui-patterns.md +342 -0
- package/references/storekit-manager-template.md +385 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 iOS Paywall Creator Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/QUICKSTART.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Quick Start Guide
|
|
2
|
+
|
|
3
|
+
Get your iOS paywall up and running in 15 minutes.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Clone to your Claude skills directory
|
|
9
|
+
git clone https://github.com/yourusername/ios-paywall-creator.git ~/.claude/skills/ios-paywall-creator
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Or download and extract to `~/.claude/skills/ios-paywall-creator/`
|
|
13
|
+
|
|
14
|
+
## Step-by-Step Guide
|
|
15
|
+
|
|
16
|
+
### 1. Start the Conversation (1 min)
|
|
17
|
+
|
|
18
|
+
Open Claude Code in your iOS project and say:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
"Help me create a paywall for my app with weekly, monthly, and yearly subscriptions"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The skill will activate automatically.
|
|
25
|
+
|
|
26
|
+
### 2. Plan Your Products (2 min)
|
|
27
|
+
|
|
28
|
+
Answer Claude's questions:
|
|
29
|
+
|
|
30
|
+
- **Product type:** Subscriptions or IAP?
|
|
31
|
+
- **Where shown:** Hard paywall, settings, or first launch?
|
|
32
|
+
- **Features:** What's locked behind the paywall?
|
|
33
|
+
|
|
34
|
+
**Example:**
|
|
35
|
+
```
|
|
36
|
+
"Auto-renewing subscriptions"
|
|
37
|
+
"Hard paywall blocking premium features"
|
|
38
|
+
"Free users get 5 features, premium users get unlimited"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 3. Configure App Store Connect (5 min)
|
|
42
|
+
|
|
43
|
+
Follow Claude's step-by-step instructions to:
|
|
44
|
+
|
|
45
|
+
1. Go to [App Store Connect](https://appstoreconnect.apple.com)
|
|
46
|
+
2. Create a Subscription Group
|
|
47
|
+
3. Add weekly/monthly/yearly subscriptions
|
|
48
|
+
4. Set pricing
|
|
49
|
+
|
|
50
|
+
**Tip:** Keep the App Store Connect tab open - you'll need the IDs next.
|
|
51
|
+
|
|
52
|
+
### 4. Provide Your Product IDs (1 min)
|
|
53
|
+
|
|
54
|
+
Claude will ask for:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Subscription Group ID: 21995608
|
|
58
|
+
Weekly Product ID: com.yourapp.premium.weekly
|
|
59
|
+
Monthly Product ID: com.yourapp.premium.monthly
|
|
60
|
+
Yearly Product ID: com.yourapp.premium.yearly
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Copy these from App Store Connect and paste them into Claude.
|
|
64
|
+
|
|
65
|
+
### 5. Choose Your Design (2 min)
|
|
66
|
+
|
|
67
|
+
Either:
|
|
68
|
+
|
|
69
|
+
**Option A:** Upload a screenshot of a paywall you like
|
|
70
|
+
|
|
71
|
+
**Option B:** Choose from generated themes:
|
|
72
|
+
- Modern Minimalist (navy + electric blue)
|
|
73
|
+
- Warm & Friendly (peach + coral)
|
|
74
|
+
- Bold & Premium (purple gradient + gold)
|
|
75
|
+
|
|
76
|
+
**Option C:** Describe your vision:
|
|
77
|
+
```
|
|
78
|
+
"Soft gradient, calm colors, zen aesthetic"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 6. Get Your Code (2 min)
|
|
82
|
+
|
|
83
|
+
Claude generates:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
โ
StoreKitManager.swift (all IDs configured)
|
|
87
|
+
โ
PaywallView.swift (your custom design)
|
|
88
|
+
โ
Integration instructions
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**All product IDs are already in the code - just copy and paste!**
|
|
92
|
+
|
|
93
|
+
### 7. Integrate (2 min)
|
|
94
|
+
|
|
95
|
+
1. Create `StoreKitManager.swift` in your Xcode project
|
|
96
|
+
2. Create `PaywallView.swift` in your Xcode project
|
|
97
|
+
3. Add initialization code to your App struct:
|
|
98
|
+
|
|
99
|
+
```swift
|
|
100
|
+
@main
|
|
101
|
+
struct YourApp: App {
|
|
102
|
+
init() {
|
|
103
|
+
StoreKitManager.shared.configure()
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
var body: some Scene {
|
|
107
|
+
WindowGroup {
|
|
108
|
+
ContentView()
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
4. Show the paywall where needed:
|
|
115
|
+
|
|
116
|
+
```swift
|
|
117
|
+
.sheet(isPresented: $showPaywall) {
|
|
118
|
+
PaywallView()
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### 8. Test (Optional)
|
|
123
|
+
|
|
124
|
+
Create a StoreKit Configuration File in Xcode:
|
|
125
|
+
1. File โ New โ StoreKit Configuration File
|
|
126
|
+
2. Add your products manually
|
|
127
|
+
3. Run your app and test purchases
|
|
128
|
+
|
|
129
|
+
## What You Get
|
|
130
|
+
|
|
131
|
+
- โ
Full StoreKit 2 implementation
|
|
132
|
+
- โ
Transaction observer for real-time updates
|
|
133
|
+
- โ
Custom paywall UI
|
|
134
|
+
- โ
Legal compliance (Terms, Privacy, auto-renewal text)
|
|
135
|
+
- โ
Restore purchases functionality
|
|
136
|
+
- โ
No manual ID configuration needed
|
|
137
|
+
|
|
138
|
+
## Common First-Time Questions
|
|
139
|
+
|
|
140
|
+
**Q: Do I need a backend server?**
|
|
141
|
+
A: No, StoreKit handles everything. Backend sync is optional.
|
|
142
|
+
|
|
143
|
+
**Q: Can I customize the colors after generation?**
|
|
144
|
+
A: Yes! Search for `Color(` in PaywallView.swift and adjust hex values.
|
|
145
|
+
|
|
146
|
+
**Q: What if I want different subscription tiers later?**
|
|
147
|
+
A: Just run the skill again with your new product IDs.
|
|
148
|
+
|
|
149
|
+
**Q: How do I test without real money?**
|
|
150
|
+
A: Use Xcode's StoreKit Configuration File or App Store Connect sandbox testers.
|
|
151
|
+
|
|
152
|
+
**Q: Does this work with SwiftUI only?**
|
|
153
|
+
A: The generated PaywallView is SwiftUI, but StoreKitManager works with UIKit too.
|
|
154
|
+
|
|
155
|
+
## Troubleshooting
|
|
156
|
+
|
|
157
|
+
**Products not loading?**
|
|
158
|
+
- Check product IDs are exact (case-sensitive)
|
|
159
|
+
- Verify "Cleared for Sale" in App Store Connect
|
|
160
|
+
- Try `try await AppStore.sync()`
|
|
161
|
+
|
|
162
|
+
**Build errors?**
|
|
163
|
+
- Ensure you're targeting iOS 15+ for StoreKit 2
|
|
164
|
+
- Import Foundation and StoreKit at the top
|
|
165
|
+
|
|
166
|
+
**Paywall doesn't show?**
|
|
167
|
+
- Check your `showPaywall` state binding
|
|
168
|
+
- Verify StoreKitManager was initialized
|
|
169
|
+
|
|
170
|
+
## Next Steps
|
|
171
|
+
|
|
172
|
+
- Add paywall to multiple locations (settings, features, first launch)
|
|
173
|
+
- Customize UI colors and layout
|
|
174
|
+
- Test thoroughly in sandbox environment
|
|
175
|
+
- Submit to App Store Review
|
|
176
|
+
|
|
177
|
+
## Need Help?
|
|
178
|
+
|
|
179
|
+
- [Full Documentation](SKILL.md)
|
|
180
|
+
- [Examples](examples/)
|
|
181
|
+
- [GitHub Issues](https://github.com/yourusername/ios-paywall-creator/issues)
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
**Time to production-ready paywall: ~15 minutes** โก
|
package/README.md
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# iOS Paywall Creator
|
|
2
|
+
|
|
3
|
+
> **A Claude Code skill that helps iOS developers create production-ready paywalls with native StoreKit 2 integration.**
|
|
4
|
+
|
|
5
|
+
Transform your iOS app monetization from zero to production-ready in minutes. This skill guides you through the complete processโfrom App Store Connect setup to beautiful, functional paywall UIโwith no placeholders or manual configuration needed.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/ios-paywall-creator)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
|
|
10
|
+
## ๐ฏ What This Skill Does
|
|
11
|
+
|
|
12
|
+
The iOS Paywall Creator is an interactive guide that walks you through:
|
|
13
|
+
|
|
14
|
+
1. **Product Planning** - Define your subscription tiers or in-app purchases
|
|
15
|
+
2. **App Store Connect Setup** - Step-by-step guidance for creating subscriptions/IAP
|
|
16
|
+
3. **ID Collection** - Captures your actual product IDs and subscription group ID
|
|
17
|
+
4. **Design Direction** - Work from inspiration images or choose from generated themes
|
|
18
|
+
5. **Code Generation** - Produces production-ready Swift code with your actual IDs pre-configured
|
|
19
|
+
|
|
20
|
+
**The Result:** Copy-paste ready `StoreKitManager.swift` and `PaywallView.swift` files that work immediatelyโno manual editing required.
|
|
21
|
+
|
|
22
|
+
## ๐ Quick Start
|
|
23
|
+
|
|
24
|
+
### Installation
|
|
25
|
+
|
|
26
|
+
**Option 1: Quick Install with npx (Recommended)**
|
|
27
|
+
```bash
|
|
28
|
+
npx ios-paywall-creator
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Option 2: Install from GitHub**
|
|
32
|
+
```bash
|
|
33
|
+
npx github:krythz43/ios-paywall-creator-skill
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Option 3: Global Installation**
|
|
37
|
+
```bash
|
|
38
|
+
npm install -g ios-paywall-creator
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Option 4: Manual Git Clone**
|
|
42
|
+
```bash
|
|
43
|
+
git clone https://github.com/krythz43/ios-paywall-creator-skill.git ~/.claude/skills/ios-paywall-creator
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
That's it! The skill will be installed to `~/.claude/skills/ios-paywall-creator` automatically.
|
|
47
|
+
|
|
48
|
+
### Prerequisites
|
|
49
|
+
|
|
50
|
+
- macOS with Xcode installed
|
|
51
|
+
- Active Apple Developer account
|
|
52
|
+
- App Store Connect access
|
|
53
|
+
- An iOS app project (SwiftUI preferred)
|
|
54
|
+
|
|
55
|
+
### Usage
|
|
56
|
+
|
|
57
|
+
Open Claude Code and say:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
"Help me create a paywall for my iOS app"
|
|
61
|
+
"Add StoreKit subscriptions to my app"
|
|
62
|
+
"I need to monetize my app with in-app purchases"
|
|
63
|
+
"Create a paywall with weekly, monthly, and yearly subscriptions"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The skill will automatically activate and guide you through the process.
|
|
67
|
+
|
|
68
|
+
## ๐ Features
|
|
69
|
+
|
|
70
|
+
### Comprehensive Guidance
|
|
71
|
+
|
|
72
|
+
- **No Experience Required** - Step-by-step instructions for App Store Connect
|
|
73
|
+
- **Multiple Product Types** - Supports auto-renewing subscriptions, consumable IAP, and non-consumable IAP
|
|
74
|
+
- **Flexible Integration** - Hard paywalls, soft paywalls, feature gates, or settings pages
|
|
75
|
+
|
|
76
|
+
### Design Flexibility
|
|
77
|
+
|
|
78
|
+
- **Inspiration-Based** - Provide a screenshot of a paywall you like
|
|
79
|
+
- **Theme Generator** - Choose from pre-designed aesthetic options
|
|
80
|
+
- **Custom Styling** - Describe your vision and get matching UI code
|
|
81
|
+
|
|
82
|
+
### Production-Ready Code
|
|
83
|
+
|
|
84
|
+
- **StoreKit 2** - Modern async/await patterns with proper error handling
|
|
85
|
+
- **Transaction Observer** - Real-time subscription status updates
|
|
86
|
+
- **Receipt Verification** - Secure transaction validation
|
|
87
|
+
- **Restore Purchases** - Built-in restoration flow
|
|
88
|
+
- **Legal Compliance** - Terms of Service, Privacy Policy, and required App Store text
|
|
89
|
+
|
|
90
|
+
### Zero Configuration
|
|
91
|
+
|
|
92
|
+
- **Actual IDs Used** - Your product IDs are inserted directly into generated code
|
|
93
|
+
- **No Placeholders** - No "YOUR_APP_ID" or manual find-and-replace needed
|
|
94
|
+
- **Copy-Paste Ready** - Generated files work immediately in your project
|
|
95
|
+
|
|
96
|
+
## ๐ก Example Workflow
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
You: "I want to add subscriptions to my meditation app"
|
|
100
|
+
|
|
101
|
+
Claude (via skill):
|
|
102
|
+
1. Asks about your monetization needs (subscriptions vs IAP)
|
|
103
|
+
2. Helps you plan pricing tiers (weekly/monthly/yearly)
|
|
104
|
+
3. Guides you through App Store Connect setup
|
|
105
|
+
4. Collects your actual product IDs:
|
|
106
|
+
- "com.yourapp.premium.weekly"
|
|
107
|
+
- "com.yourapp.premium.monthly"
|
|
108
|
+
- "com.yourapp.premium.yearly"
|
|
109
|
+
- Subscription Group ID: "21995608"
|
|
110
|
+
5. Asks for design inspiration
|
|
111
|
+
6. Generates complete Swift files with YOUR IDs already configured
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Output:**
|
|
115
|
+
- `StoreKitManager.swift` - Full StoreKit 2 implementation
|
|
116
|
+
- `PaywallView.swift` - Custom UI matching your design
|
|
117
|
+
- Integration instructions for your specific use case
|
|
118
|
+
- Testing checklist
|
|
119
|
+
|
|
120
|
+
## ๐ What You Get
|
|
121
|
+
|
|
122
|
+
### StoreKitManager.swift
|
|
123
|
+
- Transaction observer for real-time updates
|
|
124
|
+
- Product loading with error handling
|
|
125
|
+
- Purchase flow with verification
|
|
126
|
+
- Subscription status checking
|
|
127
|
+
- Restore purchases functionality
|
|
128
|
+
- Support for multiple tiers or IAP types
|
|
129
|
+
|
|
130
|
+
### PaywallView.swift
|
|
131
|
+
- Custom-designed UI based on your inspiration
|
|
132
|
+
- Subscription selection interface
|
|
133
|
+
- Feature comparison (if applicable)
|
|
134
|
+
- Legal text (Terms, Privacy, auto-renewal notice)
|
|
135
|
+
- Loading and error states
|
|
136
|
+
- Restore purchases button
|
|
137
|
+
|
|
138
|
+
### Integration Code
|
|
139
|
+
- App initialization
|
|
140
|
+
- Where to present the paywall
|
|
141
|
+
- Feature gating examples
|
|
142
|
+
- First-launch detection
|
|
143
|
+
|
|
144
|
+
## ๐จ Design Approach
|
|
145
|
+
|
|
146
|
+
The skill follows modern iOS design principles:
|
|
147
|
+
|
|
148
|
+
- **Distinctive, Not Generic** - Avoids cookie-cutter templates
|
|
149
|
+
- **Context-Aware** - Matches your app's aesthetic
|
|
150
|
+
- **Accessibility-First** - Proper labels and hints
|
|
151
|
+
- **Dark Mode Support** - Uses adaptive colors
|
|
152
|
+
- **Human-Centered** - Clear value propositions, readable legal text
|
|
153
|
+
|
|
154
|
+
## ๐ง Advanced Features
|
|
155
|
+
|
|
156
|
+
### Multiple Subscription Tiers
|
|
157
|
+
Generate code for Basic/Premium/Ultimate tier structures with proper upgrade/downgrade handling.
|
|
158
|
+
|
|
159
|
+
### Consumable IAP
|
|
160
|
+
Includes token/credit purchasing with local or backend balance tracking.
|
|
161
|
+
|
|
162
|
+
### Backend Integration
|
|
163
|
+
Optional patterns for syncing purchases with your server for cross-platform access.
|
|
164
|
+
|
|
165
|
+
### Introductory Offers
|
|
166
|
+
Support for free trials and promotional pricing (configured in App Store Connect).
|
|
167
|
+
|
|
168
|
+
## ๐ Documentation
|
|
169
|
+
|
|
170
|
+
- [SKILL.md](SKILL.md) - Complete skill implementation
|
|
171
|
+
- [references/storekit-manager-template.md](references/storekit-manager-template.md) - StoreKit patterns
|
|
172
|
+
- [references/paywall-ui-patterns.md](references/paywall-ui-patterns.md) - UI components and integration
|
|
173
|
+
- [examples/](examples/) - Real usage scenarios
|
|
174
|
+
|
|
175
|
+
## ๐งช Testing
|
|
176
|
+
|
|
177
|
+
The generated code includes:
|
|
178
|
+
|
|
179
|
+
- Sandbox testing instructions
|
|
180
|
+
- StoreKit Configuration File guidance
|
|
181
|
+
- Common issues and solutions
|
|
182
|
+
- Testing checklist for App Store Review
|
|
183
|
+
|
|
184
|
+
## ๐ค Contributing
|
|
185
|
+
|
|
186
|
+
Contributions are welcome! Please feel free to submit issues or pull requests.
|
|
187
|
+
|
|
188
|
+
1. Fork the repository
|
|
189
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
190
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
191
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
192
|
+
5. Open a Pull Request
|
|
193
|
+
|
|
194
|
+
## ๐ License
|
|
195
|
+
|
|
196
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
197
|
+
|
|
198
|
+
## ๐ Acknowledgments
|
|
199
|
+
|
|
200
|
+
- Built for [Claude Code](https://claude.ai/code) by Anthropic
|
|
201
|
+
- StoreKit 2 patterns from Apple's documentation
|
|
202
|
+
|
|
203
|
+
## ๐ Troubleshooting
|
|
204
|
+
|
|
205
|
+
### Products Not Loading
|
|
206
|
+
- Verify product IDs match exactly (case-sensitive)
|
|
207
|
+
- Check that products are "Cleared for Sale" in App Store Connect
|
|
208
|
+
- Ensure subscription group exists
|
|
209
|
+
- Try `try await AppStore.sync()`
|
|
210
|
+
|
|
211
|
+
### Purchase Doesn't Update Status
|
|
212
|
+
- Verify transaction observer is initialized
|
|
213
|
+
- Check `checkPurchasedProducts()` is called after purchase
|
|
214
|
+
- Review `Transaction.currentEntitlements` logic
|
|
215
|
+
|
|
216
|
+
### UI Issues on Small Screens
|
|
217
|
+
- Test on iPhone SE (smallest screen)
|
|
218
|
+
- Use `GeometryReader` for adaptive sizing
|
|
219
|
+
- Add `.minimumScaleFactor()` to text
|
|
220
|
+
|
|
221
|
+
## ๐ฌ Support
|
|
222
|
+
|
|
223
|
+
- Open an issue on [GitHub](https://github.com/krythz43/ios-paywall-creator-skill/issues)
|
|
224
|
+
- Check existing issues for solutions
|
|
225
|
+
- Share your experience and help others
|
|
226
|
+
|
|
227
|
+
## ๐ Star History
|
|
228
|
+
|
|
229
|
+
If this skill helped you, please consider giving it a star! โญ
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
**Made with โค๏ธ for the vibe coding community**
|