@choochmeque/tauri-plugin-iap-api 0.5.0 → 0.5.1

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.
Files changed (2) hide show
  1. package/README.md +64 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -70,6 +70,39 @@ fn main() {
70
70
  }
71
71
  ```
72
72
 
73
+ ## Example App
74
+
75
+ An example application is available in the [`examples/iap-demo`](examples/iap-demo) directory. The example demonstrates all core IAP functionality with a UI:
76
+
77
+ - Initialize IAP connection
78
+ - Fetch and display products with pricing
79
+ - Purchase products and subscriptions
80
+ - Restore previous purchases
81
+ - Check product ownership status
82
+ - Real-time purchase update notifications
83
+
84
+ ### Running the Example
85
+
86
+ ```bash
87
+ cd examples/iap-demo
88
+
89
+ # Install dependencies
90
+ pnpm install
91
+
92
+ # Run in development mode
93
+ pnpm tauri dev
94
+
95
+ # Build for production
96
+ pnpm tauri build
97
+ ```
98
+
99
+ **Important:** The app must be properly code-signed to test IAP functionality:
100
+ - **iOS/macOS**: Code signing is required by StoreKit. Configure signing in Xcode or via Tauri's configuration.
101
+ - **Android**: Sign your APK/AAB with a release keystore for production testing.
102
+ - **Windows**: App must be associated with Microsoft Store and signed for Store submission.
103
+
104
+ The example app provides a fully functional demo with inline documentation for each IAP feature, making it easy to understand how to integrate the plugin into your own application.
105
+
73
106
  ## Usage
74
107
 
75
108
  ### JavaScript/TypeScript
@@ -163,6 +196,37 @@ await listener.unregister();
163
196
  3. Associate your app with the Microsoft Store
164
197
  4. Test with Windows sandbox environment
165
198
 
199
+ ### macOS Setup
200
+
201
+ 1. Configure your app in App Store Connect
202
+ 2. Create subscription or in-app purchase products with pricing
203
+ 3. Configure code signing in `tauri.conf.json`:
204
+ ```json
205
+ {
206
+ "bundle": {
207
+ "macOS": {
208
+ "signingIdentity": "Developer ID Application: Your Name (TEAM_ID)",
209
+ "entitlements": "path/to/entitlements.plist"
210
+ }
211
+ }
212
+ }
213
+ ```
214
+ 4. Add required entitlements for StoreKit (create `entitlements.plist`):
215
+ ```xml
216
+ <?xml version="1.0" encoding="UTF-8"?>
217
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
218
+ <plist version="1.0">
219
+ <dict>
220
+ <key>com.apple.security.app-sandbox</key>
221
+ <true/>
222
+ <key>com.apple.security.network.client</key>
223
+ <true/>
224
+ </dict>
225
+ </plist>
226
+ ```
227
+ 5. Test with sandbox accounts or StoreKit Configuration files
228
+ 6. **Important**: App must be code-signed to use StoreKit APIs
229
+
166
230
  ## API Reference
167
231
 
168
232
  ### `initialize()`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@choochmeque/tauri-plugin-iap-api",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "license": "MIT",
5
5
  "author": "You",
6
6
  "description": "A Tauri v2 plugin that enables In-App Purchases (IAP)",
@@ -40,7 +40,7 @@
40
40
  "@vitest/coverage-v8": "^4.0.13",
41
41
  "@vitest/ui": "^4.0.13",
42
42
  "happy-dom": "^20.0.10",
43
- "prettier": "3.6.2",
43
+ "prettier": "3.7.4",
44
44
  "rollup": "^4.9.6",
45
45
  "tslib": "^2.6.2",
46
46
  "typescript": "^5.3.3",