native-update 3.1.1 → 3.1.3

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 (203) hide show
  1. package/AI-INTEGRATION-GUIDE.md +98 -63
  2. package/Readme.md +89 -120
  3. package/android/src/main/java/com/aoneahsan/nativeupdate/LiveUpdatePlugin.kt +88 -12
  4. package/android/src/main/java/com/aoneahsan/nativeupdate/NativeUpdatePlugin.kt +45 -18
  5. package/cli/package.json +2 -2
  6. package/dist/esm/definitions.d.ts +8 -0
  7. package/dist/esm/plugin.js +16 -2
  8. package/dist/plugin.cjs.js +1 -1
  9. package/dist/plugin.esm.js +1 -1
  10. package/dist/plugin.js +2 -2
  11. package/docs/CHANGELOG.md +108 -0
  12. package/docs/KNOWN_LIMITATIONS.md +2 -2
  13. package/docs/MIGRATION.md +1 -1
  14. package/ios/Plugin/LiveUpdate/LiveUpdatePlugin.swift +64 -8
  15. package/ios/Plugin/NativeUpdatePlugin.swift +39 -13
  16. package/package.json +8 -3
  17. package/docs/AGENTS.md +0 -47
  18. package/docs/APP_REVIEW_GUIDE.md +0 -768
  19. package/docs/BUNDLE_SIGNING.md +0 -277
  20. package/docs/CLAUDE.md +0 -110
  21. package/docs/COMPREHENSIVE_AUDIT_REPORT.md +0 -526
  22. package/docs/DEPLOY_NOTES.md +0 -117
  23. package/docs/EXAMPLE_APPS_SIMPLIFICATION_PLAN.md +0 -384
  24. package/docs/EXAMPLE_APPS_SIMPLIFICATION_TRACKER.md +0 -390
  25. package/docs/LIVE_UPDATES_GUIDE.md +0 -675
  26. package/docs/MANUAL-TASKS.md +0 -30
  27. package/docs/MARKETING_WEBSITE_TRACKER.md +0 -677
  28. package/docs/NATIVE_UPDATES_GUIDE.md +0 -695
  29. package/docs/PACKAGES.md +0 -167
  30. package/docs/PERFORMANCE.md +0 -110
  31. package/docs/PROJECT_COMPLETION_TRACKER.md +0 -411
  32. package/docs/QUICK_START.md +0 -595
  33. package/docs/README.md +0 -130
  34. package/docs/REMAINING_FEATURES.md +0 -192
  35. package/docs/ROADMAP.md +0 -295
  36. package/docs/SECURITY-IF-REPO-PUBLIC.md +0 -232
  37. package/docs/SECURITY.md +0 -356
  38. package/docs/TESTING_REQUIREMENTS.md +0 -201
  39. package/docs/ai-knowledge-base/00-project-profile.md +0 -38
  40. package/docs/ai-knowledge-base/01-features.md +0 -46
  41. package/docs/ai-knowledge-base/02-routes.md +0 -72
  42. package/docs/ai-knowledge-base/03-tech-stack.md +0 -57
  43. package/docs/ai-knowledge-base/README.md +0 -23
  44. package/docs/analytics-tracking.md +0 -37
  45. package/docs/api/API.md +0 -558
  46. package/docs/api/FEATURES.md +0 -414
  47. package/docs/api/app-review-api.md +0 -239
  48. package/docs/api/app-update-api.md +0 -154
  49. package/docs/api/background-update-api.md +0 -170
  50. package/docs/api/events-api.md +0 -323
  51. package/docs/api/live-update-api.md +0 -258
  52. package/docs/archive/MARKETING_WEBSITE_PLAN.md +0 -659
  53. package/docs/background-updates.md +0 -392
  54. package/docs/capacitor-official-plugins.md +0 -46
  55. package/docs/capawesome-plugins.md +0 -29
  56. package/docs/cli-reference.md +0 -321
  57. package/docs/deployment/HOSTINGER_DEPLOY.md +0 -370
  58. package/docs/deployment/PRODUCTION-DEPLOY-CHECKLIST.md +0 -184
  59. package/docs/docs-site/plan.md +0 -201
  60. package/docs/docs-site/scope.md +0 -127
  61. package/docs/docs-site/tracker.json +0 -235
  62. package/docs/error-handling-tracking.md +0 -37
  63. package/docs/examples/advanced-scenarios.md +0 -394
  64. package/docs/examples/android-manifest-example.xml +0 -77
  65. package/docs/examples/basic-usage.md +0 -206
  66. package/docs/examples/node-express-backend-example.md +0 -28
  67. package/docs/examples/react-capacitor-example.md +0 -29
  68. package/docs/features/app-reviews.md +0 -975
  69. package/docs/features/app-updates.md +0 -785
  70. package/docs/features/e2e-full-verification/00-overview.md +0 -99
  71. package/docs/features/e2e-full-verification/00-tracker.json +0 -284
  72. package/docs/features/e2e-full-verification/phase01-backend-schema-fixes.md +0 -183
  73. package/docs/features/e2e-full-verification/phase02-test-auth.md +0 -176
  74. package/docs/features/e2e-full-verification/phase03-api-test-coverage.md +0 -63
  75. package/docs/features/e2e-full-verification/phase04-frontend-package-contract-audit.md +0 -73
  76. package/docs/features/e2e-full-verification/phase05-browser-e2e-matrix.md +0 -69
  77. package/docs/features/e2e-full-verification/phase06-deploy-prod-smoke.md +0 -51
  78. package/docs/features/e2e-full-verification/results/phase01-drift-report.md +0 -50
  79. package/docs/features/e2e-full-verification/results/phase03-coverage-matrix.md +0 -215
  80. package/docs/features/e2e-full-verification/results/phase04-frontend-contract.md +0 -139
  81. package/docs/features/e2e-full-verification/results/phase05-e2e-results.md +0 -99
  82. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-01-dashboard.png +0 -0
  83. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-02-signup.png +0 -0
  84. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-03-settings-persisted.png +0 -0
  85. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-04a-app-created.png +0 -0
  86. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-04b-duplicate-bundle-422.png +0 -0
  87. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-05-plan-limit-403.png +0 -0
  88. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-08a-upload-graceful-fail.png +0 -0
  89. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-08b-builds-list.png +0 -0
  90. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-10-rollout-25pct.png +0 -0
  91. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-11-analytics.png +0 -0
  92. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-12-drive-disconnected.png +0 -0
  93. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-13-pricing.png +0 -0
  94. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-14-isolation-403.png +0 -0
  95. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-15a-admin-overview.png +0 -0
  96. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-15b-regular-user-admin-redirect.png +0 -0
  97. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-16a-delete-dialog.png +0 -0
  98. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-17-mobile-375.png +0 -0
  99. package/docs/features/e2e-full-verification/results/route-list.json +0 -1
  100. package/docs/features/laravel-nova-backend/ASSESSMENT-SUMMARY.md +0 -96
  101. package/docs/features/laravel-nova-backend/IMPLEMENTATION-PLAN.md +0 -504
  102. package/docs/features/laravel-nova-backend/progress-tracker.json +0 -184
  103. package/docs/features/live-updates.md +0 -642
  104. package/docs/features/queues-and-emails/00-overview.md +0 -41
  105. package/docs/features/queues-and-emails/00-tracker.json +0 -99
  106. package/docs/features/queues-and-emails/phase01-foundation.md +0 -15
  107. package/docs/features/queues-and-emails/phase02-queued-jobs.md +0 -19
  108. package/docs/features/queues-and-emails/phase03-transactional-emails.md +0 -16
  109. package/docs/features/queues-and-emails/phase04-quota-ops.md +0 -17
  110. package/docs/features/queues-and-emails/phase05-async-build-processing-DECISION.md +0 -16
  111. package/docs/features/queues-and-emails/phase06-verify-deploy.md +0 -17
  112. package/docs/getting-started/configuration.md +0 -469
  113. package/docs/getting-started/installation.md +0 -300
  114. package/docs/getting-started/quick-start.md +0 -430
  115. package/docs/guides/BACKEND_TEMPLATES_GUIDE.md +0 -183
  116. package/docs/guides/admin-panel.md +0 -268
  117. package/docs/guides/channel-management.md +0 -343
  118. package/docs/guides/dashboard-guide.md +0 -365
  119. package/docs/guides/deployment-guide.md +0 -335
  120. package/docs/guides/end-to-end-workflow.md +0 -491
  121. package/docs/guides/key-management.md +0 -284
  122. package/docs/guides/migration-from-codepush.md +0 -145
  123. package/docs/guides/security-best-practices.md +0 -1057
  124. package/docs/guides/testing-guide.md +0 -346
  125. package/docs/guides/troubleshooting.md +0 -482
  126. package/docs/package-audit.md +0 -41
  127. package/docs/plans/PLANNING_COMPLETE_SUMMARY.md +0 -361
  128. package/docs/plans/TASK_1_ANDROID_EXAMPLE_APP.md +0 -401
  129. package/docs/plans/TASK_2_API_ENDPOINTS.md +0 -856
  130. package/docs/plans/TASK_2_DASHBOARD_UI_UX.md +0 -820
  131. package/docs/plans/TASK_2_DATABASE_SCHEMA.md +0 -704
  132. package/docs/plans/TASK_2_GOOGLE_DRIVE_INTEGRATION.md +0 -646
  133. package/docs/plans/TASK_2_SAAS_ARCHITECTURE.md +0 -587
  134. package/docs/plans/TASK_2_USER_AUTHENTICATION.md +0 -600
  135. package/docs/play-store/ASO-METADATA.md +0 -5
  136. package/docs/play-store/DATA-SAFETY.md +0 -5
  137. package/docs/play-store/DECLARATIONS.md +0 -5
  138. package/docs/play-store/README.md +0 -27
  139. package/docs/play-store/RELEASE-NOTES.md +0 -99
  140. package/docs/play-store/RELEASE-STEPS.md +0 -6
  141. package/docs/play-store/STORE-LISTING.md +0 -7
  142. package/docs/play-store/SUBMISSION-CHECKLIST.md +0 -5
  143. package/docs/production-readiness.md +0 -475
  144. package/docs/project-audit/2026-05-16/00-FINALIZATION-PLAN.md +0 -123
  145. package/docs/project-audit/2026-05-16/01-BATCH-PLAN.md +0 -227
  146. package/docs/project-audit/2026-05-16/02-AUDIT-FINDINGS.md +0 -144
  147. package/docs/project-audit/2026-05-16/sessions/batch-01.md +0 -42
  148. package/docs/project-audit/2026-05-16/sessions/batch-02.md +0 -74
  149. package/docs/project-audit/2026-05-16/sessions/batch-03.md +0 -71
  150. package/docs/project-audit/2026-05-16/sessions/batch-04.md +0 -88
  151. package/docs/project-audit/2026-05-16/sessions/batch-05.md +0 -63
  152. package/docs/project-audit/2026-05-16/sessions/batch-06.md +0 -103
  153. package/docs/project-audit/2026-05-16/sessions/batch-07.md +0 -61
  154. package/docs/project-audit/2026-05-16/sessions/batch-08.md +0 -101
  155. package/docs/project-audit/2026-05-16/sessions/batch-09.md +0 -105
  156. package/docs/project-audit/2026-05-16/sessions/batch-10.md +0 -102
  157. package/docs/project-audit/AUDIT-HISTORY.md +0 -74
  158. package/docs/project-audit/BATCH-PLAN.md +0 -168
  159. package/docs/project-audit/MARKETING-WEBSITE-FINDINGS-2026-05-11.md +0 -73
  160. package/docs/project-audit/PRODUCTION-READINESS-AUDIT-2026-05-08.md +0 -275
  161. package/docs/project-finalization/00-tracker.json +0 -60
  162. package/docs/project-knowledge-base/01-system-overview.md +0 -227
  163. package/docs/project-knowledge-base/02-routes-pages-forms-users.md +0 -352
  164. package/docs/project-knowledge-base/03-tech-stack-modules-services.md +0 -379
  165. package/docs/project-knowledge-base/04-data-models-integrations.md +0 -244
  166. package/docs/project-knowledge-base/05-docs-corpus-inventory.md +0 -256
  167. package/docs/project-knowledge-base/06-operations-testing-legal-content.md +0 -208
  168. package/docs/project-knowledge-base/README.md +0 -103
  169. package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-05-19.md +0 -81
  170. package/docs/reports/AUDIT_SUMMARY_2025-12-26.md +0 -203
  171. package/docs/reports/CLAUDE-CODE-COMPLETION-PROMPT.md +0 -403
  172. package/docs/reports/CLAUDE_CODE_PROMPT.md +0 -29
  173. package/docs/reports/CODEBASE_STATUS_REPORT.md +0 -272
  174. package/docs/reports/COMPLETE_VERIFICATION.md +0 -106
  175. package/docs/reports/COMPREHENSIVE-PROJECT-AUDIT-2026-02-24.md +0 -747
  176. package/docs/reports/EVENT_FLOW_VERIFICATION.md +0 -80
  177. package/docs/reports/EXAMPLE_APPS_SIMPLIFICATION_COMPLETE.md +0 -369
  178. package/docs/reports/FINAL_STATUS.md +0 -122
  179. package/docs/reports/FINAL_VERIFICATION_CHECKLIST.md +0 -425
  180. package/docs/reports/MARKETING_WEBSITE_COMPLETE.md +0 -466
  181. package/docs/reports/PACKAGE_COMPLETENESS_REPORT.md +0 -130
  182. package/docs/reports/PRODUCTION_STATUS.md +0 -115
  183. package/docs/reports/PROJECT_RESTRUCTURE_2025-12-27.md +0 -287
  184. package/docs/reports/PROJECT_RESTRUCTURE_FINAL_SUMMARY.md +0 -464
  185. package/docs/reports/PUBLISHING_VERIFICATION.md +0 -144
  186. package/docs/reports/RELEASE_READY_SUMMARY.md +0 -99
  187. package/docs/reports/claude-completion.json +0 -241
  188. package/docs/rules-tracker.md +0 -102
  189. package/docs/security/PRE-LAUNCH-PENTEST-CHECKLIST.md +0 -116
  190. package/docs/security/certificate-pinning.md +0 -122
  191. package/docs/seo-aeo-rules.json +0 -3043
  192. package/docs/social-media-marketing/README.md +0 -81
  193. package/docs/social-media-marketing/posts-batch-01.md +0 -613
  194. package/docs/social-media-marketing/posts-batch-02.md +0 -528
  195. package/docs/social-media-marketing/whatsapp-messages-batch-01.md +0 -458
  196. package/docs/social-media-marketing/whatsapp-status-batch-01.md +0 -355
  197. package/docs/tracking/IMPLEMENTATION_TRACKER.md +0 -303
  198. package/docs/tracking/capacitor-rollout-note-2026-03-01.md +0 -21
  199. package/docs/tracking/completion-tracker-2026-02-24.json +0 -174
  200. package/docs/tracking/finalization-2026-05-16-tracker.json +0 -346
  201. package/docs/tracking/full-audit-tracker.json +0 -121
  202. package/docs/tracking/production-readiness-audit-tracker.json +0 -429
  203. package/docs/tracking/seo-checklist-tracker.json +0 -333
@@ -1,414 +0,0 @@
1
- # Capacitor Native Update - Features
2
-
3
- This document outlines all the features that will be implemented in the Capacitor Native Update plugin.
4
-
5
- ## Overview
6
-
7
- The Capacitor Native Update plugin provides a comprehensive solution for managing app updates across three key areas:
8
-
9
- 1. **Live Updates (OTA)** - Deploy web assets instantly without app store approval
10
- 2. **Native App Updates** - Manage app store updates with native UI
11
- 3. **App Reviews** - Request user reviews at optimal moments
12
-
13
- ## 1. Live Update Features (OTA)
14
-
15
- ### Bundle Management
16
-
17
- - **Download Management**
18
- - Progressive download with resume capability
19
- - Background download support
20
- - Bandwidth throttling options
21
- - Delta updates (only download changed files)
22
- - Bundle size optimization
23
-
24
- - **Version Control**
25
- - Semantic versioning support (major.minor.patch)
26
- - Bundle version separate from native app version
27
- - Version compatibility checks
28
- - Minimum native version requirements
29
-
30
- - **Storage Management**
31
- - Multiple bundle storage
32
- - Automatic cleanup of old bundles
33
- - Configurable retention policies
34
- - Bundle size limits
35
-
36
- ### Update Strategies
37
-
38
- - **Immediate Update**
39
- - Force update on app launch
40
- - Block app usage until update completes
41
- - Show progress indicator
42
-
43
- - **Background Update**
44
- - Download in background
45
- - Apply on next app restart
46
- - Silent updates without user interaction
47
-
48
- - **Manual Update**
49
- - Programmatic control over update process
50
- - Custom update UI support
51
- - User-triggered updates
52
-
53
- ### Rollback & Recovery
54
-
55
- - **Automatic Rollback**
56
- - Detect failed updates
57
- - Automatic revert to previous version
58
- - Crash detection after update
59
-
60
- - **Manual Rollback**
61
- - Programmatic rollback to specific versions
62
- - Keep multiple versions for safety
63
-
64
- - **Update Confirmation**
65
- - "Ready" confirmation mechanism
66
- - Grace period before confirming update
67
- - Telemetry on update success
68
-
69
- ### Update Channels
70
-
71
- - **Multiple Channels**
72
- - Production, staging, development
73
- - Beta testing channels
74
- - A/B testing support
75
- - Geographic targeting
76
-
77
- - **Channel Management**
78
- - Dynamic channel switching
79
- - Channel-specific configurations
80
- - User segmentation
81
-
82
- ### Security Features (Following Capacitor Security Guidelines)
83
-
84
- - **Encryption**
85
- - End-to-end encryption for bundles
86
- - AES-256-GCM encryption with authenticated encryption
87
- - Secure key management using platform keystores
88
- - Never embed encryption keys in code
89
-
90
- - **Signature Verification**
91
- - Public key bundle signing (RSA-2048 minimum)
92
- - RSA/ECDSA signature support
93
- - Certificate pinning for update servers
94
- - Signature timestamp validation
95
-
96
- - **Integrity Checks**
97
- - SHA-256 checksum validation (minimum)
98
- - SHA-512 support for enhanced security
99
- - Bundle tampering detection
100
- - Secure manifest files with nested signatures
101
- - File size validation to prevent resource exhaustion
102
-
103
- - **Network Security**
104
- - HTTPS enforcement (no HTTP fallback)
105
- - Certificate validation and pinning
106
- - Secure TLS configuration (TLS 1.2+)
107
- - Update server whitelist support
108
-
109
- - **Storage Security**
110
- - Temporary files in secure directories
111
- - Immediate cleanup of failed downloads
112
- - File permissions set to app-only access
113
- - Secure storage for sensitive configuration
114
-
115
- - **Input Validation**
116
- - Sanitize all JavaScript inputs
117
- - Path traversal prevention
118
- - URL validation and whitelist checking
119
- - Version string format validation
120
-
121
- ### Analytics & Monitoring
122
-
123
- - **Update Metrics**
124
- - Download success rates
125
- - Update application rates
126
- - Rollback frequencies
127
- - Performance impact metrics
128
-
129
- - **Error Tracking**
130
- - Detailed error logging
131
- - Network failure handling
132
- - Storage error management
133
-
134
- ## 2. Native App Update Features
135
-
136
- ### Update Detection
137
-
138
- - **Version Checking**
139
- - Check current vs available versions
140
- - Version code and name comparison
141
- - Update availability detection
142
- - Update size information
143
-
144
- - **Update Priority**
145
- - Critical updates (must update)
146
- - Recommended updates
147
- - Optional updates
148
- - Custom priority levels
149
-
150
- ### Update Types
151
-
152
- - **Immediate Updates**
153
- - Blocking UI during update
154
- - Force update for critical fixes
155
- - Update progress tracking
156
- - Automatic app restart
157
-
158
- - **Flexible Updates**
159
- - Background download
160
- - User-controlled installation
161
- - Download progress notifications
162
- - Install at convenient time
163
-
164
- ### Platform Integration
165
-
166
- - **Android Features**
167
- - Google Play Core integration
168
- - In-app update API support
169
- - Play Store navigation
170
- - Update state persistence
171
-
172
- - **iOS Features**
173
- - App Store version checking
174
- - iTunes API integration
175
- - App Store redirect
176
- - Version comparison logic
177
-
178
- ### Update UI
179
-
180
- - **Native Dialogs**
181
- - Platform-specific update prompts
182
- - Customizable messaging
183
- - Localization support
184
- - Action button customization
185
-
186
- - **Custom UI Support**
187
- - Programmatic update flow
188
- - Custom dialog integration
189
- - Progress indicators
190
- - Update postponement
191
-
192
- ## 3. App Review Features
193
-
194
- ### Review Prompts
195
-
196
- - **In-App Reviews**
197
- - Native review dialogs
198
- - No app switching required
199
- - Platform-optimized experience
200
- - Fallback mechanisms
201
-
202
- - **Smart Triggering**
203
- - Optimal timing detection
204
- - User engagement tracking
205
- - Positive experience detection
206
- - Configurable triggers
207
-
208
- ### Rate Limiting
209
-
210
- - **Platform Limits**
211
- - iOS: Maximum 3 times per year
212
- - Android: Quota management
213
- - Custom rate limiting
214
- - User preference tracking
215
-
216
- - **Intelligent Scheduling**
217
- - Avoid review fatigue
218
- - Track previous requests
219
- - User sentiment analysis
220
- - Conditional triggering
221
-
222
- ### Analytics
223
-
224
- - **Review Metrics**
225
- - Request success rates
226
- - User interaction tracking
227
- - Conversion metrics
228
- - Platform-specific analytics
229
-
230
- ## 4. Configuration & Management
231
-
232
- ### Plugin Configuration
233
-
234
- ```typescript
235
- {
236
- // Live Update Configuration
237
- liveUpdate: {
238
- appId: string;
239
- serverUrl: string;
240
- channel: string;
241
- autoUpdate: boolean;
242
- updateStrategy: 'immediate' | 'background' | 'manual';
243
- publicKey?: string;
244
- checkInterval?: number;
245
- allowEmulator?: boolean;
246
- },
247
-
248
- // App Update Configuration
249
- appUpdate: {
250
- minimumVersion?: string;
251
- updatePriority?: number;
252
- storeUrl?: {
253
- android?: string;
254
- ios?: string;
255
- };
256
- checkOnAppStart?: boolean;
257
- },
258
-
259
- // App Review Configuration
260
- appReview: {
261
- minimumDaysSinceInstall?: number;
262
- minimumDaysSinceLastPrompt?: number;
263
- minimumLaunchCount?: number;
264
- customTriggers?: string[];
265
- debugMode?: boolean;
266
- },
267
-
268
- // Security Configuration
269
- security: {
270
- enforceHttps?: boolean; // Default: true
271
- certificatePinning?: {
272
- enabled: boolean;
273
- certificates: string[]; // SHA256 fingerprints
274
- maxAge?: number;
275
- };
276
- requireSignature?: boolean; // Default: true
277
- validateChecksums?: boolean; // Default: true
278
- maxBundleSize?: number; // Default: 50MB
279
- allowedUpdateServers?: string[]; // Whitelist
280
- secureStorage?: boolean; // Default: true
281
- }
282
- }
283
- ```
284
-
285
- ### Error Handling
286
-
287
- - Comprehensive error codes without exposing system details
288
- - User-friendly error messages
289
- - Detailed internal logging (without sensitive data)
290
- - Recovery strategies for common failures
291
- - Fallback mechanisms for degraded functionality
292
- - Security event logging and monitoring
293
-
294
- ### Testing Support
295
-
296
- - Debug mode for development (disabled in production)
297
- - Update simulation with mock servers
298
- - Force update triggers (development only)
299
- - Review prompt testing
300
- - Security testing tools
301
- - Malformed bundle testing
302
- - Certificate validation testing
303
-
304
- ## 5. Web Platform Support
305
-
306
- ### Progressive Web Apps
307
-
308
- - Service worker integration
309
- - Cache management
310
- - Update notifications
311
- - Background sync
312
-
313
- ### Web Fallbacks
314
-
315
- - Graceful degradation
316
- - Feature detection
317
- - Browser compatibility
318
- - Update simulations
319
-
320
- ## 6. Security Implementation Details
321
-
322
- ### Platform-Specific Security
323
-
324
- #### iOS Security
325
-
326
- - **Keychain Services** for storing encryption keys and sensitive data
327
- - **App Transport Security** enforcement (no HTTP allowed)
328
- - **Code signing** validation for update bundles
329
- - **Sandbox validation** for all file operations
330
- - **Entitlements** properly configured for network access
331
-
332
- #### Android Security
333
-
334
- - **Android Keystore** for cryptographic key storage
335
- - **Network Security Config** for certificate pinning
336
- - **Runtime permissions** for storage and network access
337
- - **ProGuard/R8** obfuscation for release builds
338
- - **SafetyNet** integration for device attestation
339
-
340
- ### Security Protocols
341
-
342
- - **Update Protocol**
343
- 1. HTTPS request with certificate validation
344
- 2. Server authentication via API keys
345
- 3. Bundle download with progress tracking
346
- 4. Checksum verification (SHA-256/512)
347
- 5. Signature verification (RSA/ECDSA)
348
- 6. Secure extraction to temporary directory
349
- 7. Validation of bundle contents
350
- 8. Atomic installation with rollback capability
351
-
352
- - **Key Management**
353
- - Public keys distributed with app
354
- - Private keys secured on update server
355
- - Key rotation support with versioning
356
- - Hardware-backed key storage when available
357
-
358
- ### Threat Mitigation
359
-
360
- - **Man-in-the-Middle**: Certificate pinning, HTTPS enforcement
361
- - **Bundle Tampering**: Cryptographic signatures, checksums
362
- - **Downgrade Attacks**: Version validation, no downgrades by default
363
- - **Path Traversal**: Input sanitization, sandboxed operations
364
- - **Resource Exhaustion**: File size limits, timeout controls
365
- - **Replay Attacks**: Timestamp validation, nonce usage
366
-
367
- ## 7. Performance Optimizations
368
-
369
- ### Resource Management
370
-
371
- - Memory efficient downloads with streaming
372
- - Disk space pre-check before download
373
- - CPU usage optimization with background threads
374
- - Battery awareness (defer updates on low battery)
375
- - Network state monitoring
376
-
377
- ### Network Optimization
378
-
379
- - Intelligent retry with exponential backoff
380
- - Connection type detection (WiFi preferred)
381
- - Bandwidth throttling options
382
- - CDN support with geographic distribution
383
- - Resume capability for interrupted downloads
384
- - Delta update support to minimize download size
385
-
386
- ## 8. Compliance and Privacy
387
-
388
- ### Data Protection
389
-
390
- - GDPR compliance with data minimization
391
- - No personal data collection in update process
392
- - Anonymous usage statistics (opt-in)
393
- - Secure data transmission and storage
394
- - Right to erasure support
395
-
396
- ### App Store Compliance
397
-
398
- - iOS App Store guidelines compliance
399
- - Google Play Store policy adherence
400
- - Transparent update notifications
401
- - User consent for major updates
402
- - No code injection or dynamic frameworks
403
-
404
- ## 9. Future Enhancements
405
-
406
- ### Planned Features
407
-
408
- - Machine learning for optimal update timing
409
- - Predictive pre-loading
410
- - Peer-to-peer update distribution
411
- - Advanced A/B testing framework
412
- - Custom update UI components
413
- - Update scheduling APIs
414
- - Differential compression algorithms
@@ -1,239 +0,0 @@
1
- # App Review API Reference
2
-
3
- Complete API documentation for in-app review functionality.
4
-
5
- ## Methods
6
-
7
- ### requestReview(options?)
8
-
9
- Request an in-app review dialog.
10
-
11
- ```typescript
12
- const result = await NativeUpdate.requestReview({
13
- force?: boolean; // Bypass rate limiting (testing only)
14
- });
15
- // Returns:
16
- {
17
- displayed: boolean; // Was review dialog shown?
18
- reason?: string; // Why not displayed
19
- platform: string; // Platform used
20
- lastRequestDate?: number; // Last request timestamp
21
- requestCount?: number; // Total request count
22
- }
23
- ```
24
-
25
- ### canRequestReview()
26
-
27
- Check if a review can be requested (respects rate limits).
28
-
29
- ```typescript
30
- const result = await NativeUpdate.canRequestReview();
31
- // Returns:
32
- {
33
- canRequest: boolean;
34
- reason?: string; // Why not available
35
- lastRequestDate?: number; // Last request timestamp
36
- requestCount?: number; // Times requested
37
- daysUntilNext?: number; // Days until can request
38
- }
39
- ```
40
-
41
- ### openStoreReview()
42
-
43
- Open the app store review page directly.
44
-
45
- ```typescript
46
- await NativeUpdate.openStoreReview();
47
- // Opens app store with review section focused
48
- ```
49
-
50
- ### getStoreReviewUrl()
51
-
52
- Get the store review URL without opening it.
53
-
54
- ```typescript
55
- const result = await NativeUpdate.getStoreReviewUrl();
56
- // Returns:
57
- {
58
- url: string; // Direct review URL
59
- platform: 'ios' | 'android' | 'web';
60
- }
61
- ```
62
-
63
- ### resetReviewPrompts()
64
-
65
- Reset review request history (testing only).
66
-
67
- ```typescript
68
- await NativeUpdate.resetReviewPrompts();
69
- ```
70
-
71
- ### setReviewConditions(conditions)
72
-
73
- Set conditions for when to show review prompts.
74
-
75
- ```typescript
76
- await NativeUpdate.setReviewConditions({
77
- minimumDaysSinceInstall?: number; // Default: 3
78
- minimumDaysSinceLastPrompt?: number; // Default: 90
79
- minimumAppLaunches?: number; // Default: 5
80
- minimumSignificantEvents?: number; // Default: 3
81
- });
82
- ```
83
-
84
- ### trackSignificantEvent(eventName)
85
-
86
- Track significant events for review timing.
87
-
88
- ```typescript
89
- await NativeUpdate.trackSignificantEvent(eventName: string);
90
- // Examples: 'purchase_completed', 'level_completed', 'content_shared'
91
- ```
92
-
93
- ## Events
94
-
95
- Note: App review events are handled natively by the platform's review system. The plugin does not expose custom events for review prompts as these are controlled by iOS StoreKit and Android Play Core.
96
-
97
- ## Platform Implementation
98
-
99
- ### iOS (StoreKit)
100
-
101
- - Uses `SKStoreReviewController.requestReview()`
102
- - Limited to 3 prompts per 365-day period
103
- - No callback for user action
104
- - Shows native iOS review dialog
105
- - Requires iOS 10.3+
106
-
107
- ### Android (Google Play)
108
-
109
- - Uses Play Core In-App Review API
110
- - No specific rate limits documented
111
- - Shows native Play Store review flow
112
- - Requires Play Core Library
113
- - Android 5.0+ (API 21+)
114
-
115
- ### Web
116
-
117
- - Shows custom review prompt
118
- - Redirects to review URL
119
- - No rate limiting
120
- - Customizable UI
121
-
122
- ## Best Practices
123
-
124
- ### 1. Time Review Requests Appropriately
125
-
126
- ```typescript
127
- // After positive interaction
128
- async function onPurchaseComplete() {
129
- await processPayment();
130
- await showThankYouMessage();
131
-
132
- // Wait a bit, then request review
133
- setTimeout(async () => {
134
- const { canRequest } = await NativeUpdate.canRequestReview();
135
- if (canRequest) {
136
- await NativeUpdate.requestReview();
137
- }
138
- }, 2000);
139
- }
140
- ```
141
-
142
- ### 2. Track Significant Events
143
-
144
- ```typescript
145
- // Define what counts as significant
146
- const SIGNIFICANT_EVENTS = [
147
- 'tutorial_completed',
148
- 'first_purchase',
149
- 'level_10_reached',
150
- 'friend_invited',
151
- 'content_created'
152
- ];
153
-
154
- async function trackUserAction(action: string) {
155
- if (SIGNIFICANT_EVENTS.includes(action)) {
156
- await NativeUpdate.trackSignificantEvent(action);
157
- }
158
- }
159
- ```
160
-
161
- ### 3. Implement Smart Conditions
162
-
163
- ```typescript
164
- // Configure smart conditions
165
- await NativeUpdate.setReviewConditions({
166
- minimumDaysSinceInstall: 7, // Week after install
167
- minimumDaysSinceLastPrompt: 120, // 4 months between
168
- minimumAppLaunches: 10, // Regular user
169
- minimumSignificantEvents: 5 // Engaged user
170
- });
171
- ```
172
-
173
- ### 4. Fallback Strategy
174
-
175
- ```typescript
176
- async function requestReviewSmart() {
177
- try {
178
- const { displayed } = await NativeUpdate.requestReview();
179
-
180
- if (!displayed) {
181
- // Fallback: Show custom UI with store link
182
- const response = await showCustomReviewDialog();
183
- if (response === 'yes') {
184
- await NativeUpdate.openStoreReview();
185
- }
186
- }
187
- } catch (error) {
188
- console.error('Review request failed:', error);
189
- }
190
- }
191
- ```
192
-
193
- ## Rate Limiting
194
-
195
- ### iOS Limits
196
- - Maximum 3 prompts per 365 days
197
- - No prompt if user has already rated
198
- - System decides when to show
199
-
200
- ### Android Guidelines
201
- - No hard limits specified
202
- - Don't prompt during onboarding
203
- - Don't prompt after errors
204
- - Respect user choice
205
-
206
- ### Custom Implementation
207
- ```typescript
208
- class ReviewManager {
209
- private readonly MAX_REQUESTS_PER_YEAR = 3;
210
- private readonly DAYS_BETWEEN_PROMPTS = 120;
211
-
212
- async canRequestReview(): Promise<boolean> {
213
- const history = await this.getRequestHistory();
214
- const now = Date.now();
215
- const oneYearAgo = now - (365 * 24 * 60 * 60 * 1000);
216
-
217
- const recentRequests = history.filter(date => date > oneYearAgo);
218
-
219
- if (recentRequests.length >= this.MAX_REQUESTS_PER_YEAR) {
220
- return false;
221
- }
222
-
223
- const lastRequest = Math.max(...history);
224
- const daysSinceLastRequest = (now - lastRequest) / (24 * 60 * 60 * 1000);
225
-
226
- return daysSinceLastRequest >= this.DAYS_BETWEEN_PROMPTS;
227
- }
228
- }
229
- ```
230
-
231
- ## Error Codes
232
-
233
- | Code | Description |
234
- |------|-------------|
235
- | `RATE_LIMITED` | Too many recent requests |
236
- | `CONDITIONS_NOT_MET` | Review conditions not satisfied |
237
- | `PLATFORM_NOT_SUPPORTED` | Feature not available on platform |
238
- | `USER_CANCELLED` | User dismissed the prompt |
239
- | `ALREADY_RATED` | User has already rated the app |