native-update 3.1.2 → 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 (202) hide show
  1. package/AI-INTEGRATION-GUIDE.md +15 -10
  2. package/Readme.md +35 -35
  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/dist/esm/definitions.d.ts +8 -0
  6. package/dist/esm/plugin.js +16 -2
  7. package/dist/plugin.cjs.js +1 -1
  8. package/dist/plugin.esm.js +1 -1
  9. package/dist/plugin.js +2 -2
  10. package/docs/CHANGELOG.md +73 -0
  11. package/docs/KNOWN_LIMITATIONS.md +2 -2
  12. package/docs/MIGRATION.md +1 -1
  13. package/ios/Plugin/LiveUpdate/LiveUpdatePlugin.swift +64 -8
  14. package/ios/Plugin/NativeUpdatePlugin.swift +39 -13
  15. package/package.json +8 -3
  16. package/docs/AGENTS.md +0 -47
  17. package/docs/APP_REVIEW_GUIDE.md +0 -768
  18. package/docs/BUNDLE_SIGNING.md +0 -277
  19. package/docs/CLAUDE.md +0 -110
  20. package/docs/COMPREHENSIVE_AUDIT_REPORT.md +0 -526
  21. package/docs/DEPLOY_NOTES.md +0 -116
  22. package/docs/EXAMPLE_APPS_SIMPLIFICATION_PLAN.md +0 -384
  23. package/docs/EXAMPLE_APPS_SIMPLIFICATION_TRACKER.md +0 -390
  24. package/docs/LIVE_UPDATES_GUIDE.md +0 -675
  25. package/docs/MANUAL-TASKS.md +0 -30
  26. package/docs/MARKETING_WEBSITE_TRACKER.md +0 -677
  27. package/docs/NATIVE_UPDATES_GUIDE.md +0 -695
  28. package/docs/PACKAGES.md +0 -167
  29. package/docs/PERFORMANCE.md +0 -110
  30. package/docs/PROJECT_COMPLETION_TRACKER.md +0 -411
  31. package/docs/QUICK_START.md +0 -595
  32. package/docs/README.md +0 -130
  33. package/docs/REMAINING_FEATURES.md +0 -192
  34. package/docs/ROADMAP.md +0 -295
  35. package/docs/SECURITY-IF-REPO-PUBLIC.md +0 -232
  36. package/docs/SECURITY.md +0 -356
  37. package/docs/TESTING_REQUIREMENTS.md +0 -201
  38. package/docs/ai-knowledge-base/00-project-profile.md +0 -38
  39. package/docs/ai-knowledge-base/01-features.md +0 -46
  40. package/docs/ai-knowledge-base/02-routes.md +0 -72
  41. package/docs/ai-knowledge-base/03-tech-stack.md +0 -57
  42. package/docs/ai-knowledge-base/README.md +0 -23
  43. package/docs/analytics-tracking.md +0 -37
  44. package/docs/api/API.md +0 -558
  45. package/docs/api/FEATURES.md +0 -414
  46. package/docs/api/app-review-api.md +0 -239
  47. package/docs/api/app-update-api.md +0 -154
  48. package/docs/api/background-update-api.md +0 -170
  49. package/docs/api/events-api.md +0 -323
  50. package/docs/api/live-update-api.md +0 -258
  51. package/docs/archive/MARKETING_WEBSITE_PLAN.md +0 -659
  52. package/docs/background-updates.md +0 -392
  53. package/docs/capacitor-official-plugins.md +0 -46
  54. package/docs/capawesome-plugins.md +0 -29
  55. package/docs/cli-reference.md +0 -321
  56. package/docs/deployment/HOSTINGER_DEPLOY.md +0 -370
  57. package/docs/deployment/PRODUCTION-DEPLOY-CHECKLIST.md +0 -184
  58. package/docs/docs-site/plan.md +0 -201
  59. package/docs/docs-site/scope.md +0 -127
  60. package/docs/docs-site/tracker.json +0 -235
  61. package/docs/error-handling-tracking.md +0 -37
  62. package/docs/examples/advanced-scenarios.md +0 -394
  63. package/docs/examples/android-manifest-example.xml +0 -77
  64. package/docs/examples/basic-usage.md +0 -206
  65. package/docs/examples/node-express-backend-example.md +0 -28
  66. package/docs/examples/react-capacitor-example.md +0 -29
  67. package/docs/features/app-reviews.md +0 -975
  68. package/docs/features/app-updates.md +0 -785
  69. package/docs/features/e2e-full-verification/00-overview.md +0 -99
  70. package/docs/features/e2e-full-verification/00-tracker.json +0 -284
  71. package/docs/features/e2e-full-verification/phase01-backend-schema-fixes.md +0 -183
  72. package/docs/features/e2e-full-verification/phase02-test-auth.md +0 -176
  73. package/docs/features/e2e-full-verification/phase03-api-test-coverage.md +0 -63
  74. package/docs/features/e2e-full-verification/phase04-frontend-package-contract-audit.md +0 -73
  75. package/docs/features/e2e-full-verification/phase05-browser-e2e-matrix.md +0 -69
  76. package/docs/features/e2e-full-verification/phase06-deploy-prod-smoke.md +0 -51
  77. package/docs/features/e2e-full-verification/results/phase01-drift-report.md +0 -50
  78. package/docs/features/e2e-full-verification/results/phase03-coverage-matrix.md +0 -215
  79. package/docs/features/e2e-full-verification/results/phase04-frontend-contract.md +0 -139
  80. package/docs/features/e2e-full-verification/results/phase05-e2e-results.md +0 -99
  81. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-01-dashboard.png +0 -0
  82. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-02-signup.png +0 -0
  83. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-03-settings-persisted.png +0 -0
  84. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-04a-app-created.png +0 -0
  85. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-04b-duplicate-bundle-422.png +0 -0
  86. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-05-plan-limit-403.png +0 -0
  87. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-08a-upload-graceful-fail.png +0 -0
  88. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-08b-builds-list.png +0 -0
  89. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-10-rollout-25pct.png +0 -0
  90. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-11-analytics.png +0 -0
  91. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-12-drive-disconnected.png +0 -0
  92. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-13-pricing.png +0 -0
  93. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-14-isolation-403.png +0 -0
  94. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-15a-admin-overview.png +0 -0
  95. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-15b-regular-user-admin-redirect.png +0 -0
  96. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-16a-delete-dialog.png +0 -0
  97. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-17-mobile-375.png +0 -0
  98. package/docs/features/e2e-full-verification/results/route-list.json +0 -1
  99. package/docs/features/laravel-nova-backend/ASSESSMENT-SUMMARY.md +0 -96
  100. package/docs/features/laravel-nova-backend/IMPLEMENTATION-PLAN.md +0 -504
  101. package/docs/features/laravel-nova-backend/progress-tracker.json +0 -184
  102. package/docs/features/live-updates.md +0 -642
  103. package/docs/features/queues-and-emails/00-overview.md +0 -41
  104. package/docs/features/queues-and-emails/00-tracker.json +0 -99
  105. package/docs/features/queues-and-emails/phase01-foundation.md +0 -15
  106. package/docs/features/queues-and-emails/phase02-queued-jobs.md +0 -19
  107. package/docs/features/queues-and-emails/phase03-transactional-emails.md +0 -16
  108. package/docs/features/queues-and-emails/phase04-quota-ops.md +0 -17
  109. package/docs/features/queues-and-emails/phase05-async-build-processing-DECISION.md +0 -16
  110. package/docs/features/queues-and-emails/phase06-verify-deploy.md +0 -17
  111. package/docs/getting-started/configuration.md +0 -469
  112. package/docs/getting-started/installation.md +0 -300
  113. package/docs/getting-started/quick-start.md +0 -430
  114. package/docs/guides/BACKEND_TEMPLATES_GUIDE.md +0 -183
  115. package/docs/guides/admin-panel.md +0 -268
  116. package/docs/guides/channel-management.md +0 -343
  117. package/docs/guides/dashboard-guide.md +0 -365
  118. package/docs/guides/deployment-guide.md +0 -335
  119. package/docs/guides/end-to-end-workflow.md +0 -491
  120. package/docs/guides/key-management.md +0 -284
  121. package/docs/guides/migration-from-codepush.md +0 -145
  122. package/docs/guides/security-best-practices.md +0 -1057
  123. package/docs/guides/testing-guide.md +0 -346
  124. package/docs/guides/troubleshooting.md +0 -482
  125. package/docs/package-audit.md +0 -41
  126. package/docs/plans/PLANNING_COMPLETE_SUMMARY.md +0 -361
  127. package/docs/plans/TASK_1_ANDROID_EXAMPLE_APP.md +0 -401
  128. package/docs/plans/TASK_2_API_ENDPOINTS.md +0 -856
  129. package/docs/plans/TASK_2_DASHBOARD_UI_UX.md +0 -820
  130. package/docs/plans/TASK_2_DATABASE_SCHEMA.md +0 -704
  131. package/docs/plans/TASK_2_GOOGLE_DRIVE_INTEGRATION.md +0 -646
  132. package/docs/plans/TASK_2_SAAS_ARCHITECTURE.md +0 -587
  133. package/docs/plans/TASK_2_USER_AUTHENTICATION.md +0 -600
  134. package/docs/play-store/ASO-METADATA.md +0 -5
  135. package/docs/play-store/DATA-SAFETY.md +0 -5
  136. package/docs/play-store/DECLARATIONS.md +0 -5
  137. package/docs/play-store/README.md +0 -27
  138. package/docs/play-store/RELEASE-NOTES.md +0 -99
  139. package/docs/play-store/RELEASE-STEPS.md +0 -6
  140. package/docs/play-store/STORE-LISTING.md +0 -7
  141. package/docs/play-store/SUBMISSION-CHECKLIST.md +0 -5
  142. package/docs/production-readiness.md +0 -475
  143. package/docs/project-audit/2026-05-16/00-FINALIZATION-PLAN.md +0 -123
  144. package/docs/project-audit/2026-05-16/01-BATCH-PLAN.md +0 -227
  145. package/docs/project-audit/2026-05-16/02-AUDIT-FINDINGS.md +0 -144
  146. package/docs/project-audit/2026-05-16/sessions/batch-01.md +0 -42
  147. package/docs/project-audit/2026-05-16/sessions/batch-02.md +0 -74
  148. package/docs/project-audit/2026-05-16/sessions/batch-03.md +0 -71
  149. package/docs/project-audit/2026-05-16/sessions/batch-04.md +0 -88
  150. package/docs/project-audit/2026-05-16/sessions/batch-05.md +0 -63
  151. package/docs/project-audit/2026-05-16/sessions/batch-06.md +0 -103
  152. package/docs/project-audit/2026-05-16/sessions/batch-07.md +0 -61
  153. package/docs/project-audit/2026-05-16/sessions/batch-08.md +0 -101
  154. package/docs/project-audit/2026-05-16/sessions/batch-09.md +0 -105
  155. package/docs/project-audit/2026-05-16/sessions/batch-10.md +0 -102
  156. package/docs/project-audit/AUDIT-HISTORY.md +0 -74
  157. package/docs/project-audit/BATCH-PLAN.md +0 -168
  158. package/docs/project-audit/MARKETING-WEBSITE-FINDINGS-2026-05-11.md +0 -73
  159. package/docs/project-audit/PRODUCTION-READINESS-AUDIT-2026-05-08.md +0 -275
  160. package/docs/project-finalization/00-tracker.json +0 -60
  161. package/docs/project-knowledge-base/01-system-overview.md +0 -227
  162. package/docs/project-knowledge-base/02-routes-pages-forms-users.md +0 -352
  163. package/docs/project-knowledge-base/03-tech-stack-modules-services.md +0 -379
  164. package/docs/project-knowledge-base/04-data-models-integrations.md +0 -244
  165. package/docs/project-knowledge-base/05-docs-corpus-inventory.md +0 -256
  166. package/docs/project-knowledge-base/06-operations-testing-legal-content.md +0 -208
  167. package/docs/project-knowledge-base/README.md +0 -103
  168. package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-05-19.md +0 -81
  169. package/docs/reports/AUDIT_SUMMARY_2025-12-26.md +0 -203
  170. package/docs/reports/CLAUDE-CODE-COMPLETION-PROMPT.md +0 -403
  171. package/docs/reports/CLAUDE_CODE_PROMPT.md +0 -29
  172. package/docs/reports/CODEBASE_STATUS_REPORT.md +0 -272
  173. package/docs/reports/COMPLETE_VERIFICATION.md +0 -106
  174. package/docs/reports/COMPREHENSIVE-PROJECT-AUDIT-2026-02-24.md +0 -747
  175. package/docs/reports/EVENT_FLOW_VERIFICATION.md +0 -80
  176. package/docs/reports/EXAMPLE_APPS_SIMPLIFICATION_COMPLETE.md +0 -369
  177. package/docs/reports/FINAL_STATUS.md +0 -122
  178. package/docs/reports/FINAL_VERIFICATION_CHECKLIST.md +0 -425
  179. package/docs/reports/MARKETING_WEBSITE_COMPLETE.md +0 -466
  180. package/docs/reports/PACKAGE_COMPLETENESS_REPORT.md +0 -130
  181. package/docs/reports/PRODUCTION_STATUS.md +0 -115
  182. package/docs/reports/PROJECT_RESTRUCTURE_2025-12-27.md +0 -287
  183. package/docs/reports/PROJECT_RESTRUCTURE_FINAL_SUMMARY.md +0 -464
  184. package/docs/reports/PUBLISHING_VERIFICATION.md +0 -144
  185. package/docs/reports/RELEASE_READY_SUMMARY.md +0 -99
  186. package/docs/reports/claude-completion.json +0 -241
  187. package/docs/rules-tracker.md +0 -102
  188. package/docs/security/PRE-LAUNCH-PENTEST-CHECKLIST.md +0 -116
  189. package/docs/security/certificate-pinning.md +0 -122
  190. package/docs/seo-aeo-rules.json +0 -3043
  191. package/docs/social-media-marketing/README.md +0 -81
  192. package/docs/social-media-marketing/posts-batch-01.md +0 -613
  193. package/docs/social-media-marketing/posts-batch-02.md +0 -528
  194. package/docs/social-media-marketing/whatsapp-messages-batch-01.md +0 -458
  195. package/docs/social-media-marketing/whatsapp-status-batch-01.md +0 -355
  196. package/docs/tracking/IMPLEMENTATION_TRACKER.md +0 -303
  197. package/docs/tracking/capacitor-rollout-note-2026-03-01.md +0 -21
  198. package/docs/tracking/completion-tracker-2026-02-24.json +0 -174
  199. package/docs/tracking/finalization-2026-05-16-tracker.json +0 -346
  200. package/docs/tracking/full-audit-tracker.json +0 -121
  201. package/docs/tracking/production-readiness-audit-tracker.json +0 -429
  202. package/docs/tracking/seo-checklist-tracker.json +0 -333
@@ -1,346 +0,0 @@
1
- # Comprehensive Testing Guide
2
-
3
- This guide covers the manual and on-device testing approaches for the Capacitor Native Update plugin. Verification is done in actual/live apps using the plugin rather than an automated JS test runner.
4
-
5
- ## Testing Levels
6
-
7
- ### 1. Integration Testing
8
-
9
- #### Web Platform Testing
10
-
11
- 1. **Setup Test Environment**
12
- ```bash
13
- # Start the test server
14
- cd production-backend
15
- yarn install
16
- yarn db:init
17
- npm start
18
- ```
19
-
20
- 2. **Configure Plugin**
21
- ```typescript
22
- await NativeUpdate.configure({
23
- serverUrl: 'http://localhost:3000',
24
- channel: 'development',
25
- autoCheck: true,
26
- });
27
- ```
28
-
29
- 3. **Test Update Flow**
30
- ```typescript
31
- // Check for updates
32
- const update = await NativeUpdate.sync();
33
-
34
- // Update will be downloaded and applied based on sync result
35
- if (update.status === 'UPDATE_INSTALLED') {
36
- await NativeUpdate.reload();
37
- }
38
- ```
39
-
40
- #### iOS Testing
41
-
42
- 1. **Simulator Testing**
43
- ```bash
44
- # Build and run in iOS simulator
45
- npx cap sync ios
46
- npx cap run ios
47
- ```
48
-
49
- 2. **Device Testing**
50
- - Connect iOS device
51
- - Enable developer mode
52
- - Run via Xcode
53
-
54
- 3. **Test Cases**
55
- - HTTPS enforcement
56
- - Bundle download progress
57
- - Checksum validation
58
- - App store redirect
59
-
60
- #### Android Testing
61
-
62
- 1. **Emulator Testing**
63
- ```bash
64
- # Build and run in Android emulator
65
- npx cap sync android
66
- npx cap run android
67
- ```
68
-
69
- 2. **Device Testing**
70
- - Enable USB debugging
71
- - Connect Android device
72
- - Run via Android Studio
73
-
74
- 3. **Test Cases**
75
- - Permission handling
76
- - Background updates
77
- - In-app update UI
78
- - Rollback functionality
79
-
80
- ### 2. Security Testing
81
-
82
- #### Certificate Validation
83
- ```typescript
84
- // Test HTTPS enforcement
85
- try {
86
- await NativeUpdate.configure({
87
- serverUrl: 'http://insecure.com', // Should fail
88
- });
89
- } catch (error) {
90
- console.log('HTTPS enforcement working');
91
- }
92
- ```
93
-
94
- #### Signature Verification
95
- ```bash
96
- # Create signed bundle
97
- npx native-update bundle sign test-bundle.zip --key private-key.pem
98
-
99
- # Verify in app
100
- const isValid = await NativeUpdate.validateUpdate({
101
- bundlePath: 'bundle-path',
102
- checksum: 'bundle-checksum',
103
- signature: signature
104
- });
105
- ```
106
-
107
- ### 3. Performance Testing
108
-
109
- #### Download Performance
110
- ```typescript
111
- // Monitor download speed
112
- NativeUpdate.addListener('downloadProgress', (progress) => {
113
- console.log(`Speed: ${progress.speed} MB/s`);
114
- console.log(`Progress: ${progress.percent}%`);
115
- });
116
- ```
117
-
118
- #### Memory Usage
119
- - Monitor app memory during updates
120
- - Test with large bundles (50MB+)
121
- - Verify cleanup of old bundles
122
-
123
- ### 4. End-to-End Testing
124
-
125
- #### Complete Update Cycle
126
-
127
- 1. **Prepare Test Bundle**
128
- ```bash
129
- # Create bundle
130
- npx native-update bundle create ./www
131
-
132
- # Sign bundle
133
- npx native-update bundle sign bundle.zip --key private-key.pem
134
-
135
- # Upload to server
136
- curl -X POST http://localhost:3000/api/updates/upload/update-id \
137
- -H "Authorization: ApiKey your-api-key" \
138
- -F "bundle=@bundle.zip" \
139
- -F "signature=@bundle.sig"
140
- ```
141
-
142
- 2. **Test Update Flow**
143
- ```typescript
144
- // Full update test
145
- async function testCompleteUpdate() {
146
- // Configure
147
- await NativeUpdate.configure({
148
- serverUrl: 'https://your-server.com',
149
- publicKey: 'your-public-key',
150
- });
151
-
152
- // Sync will check, download and apply update
153
- const result = await NativeUpdate.sync();
154
-
155
- if (result.status === 'UPDATE_INSTALLED') {
156
- // Reload to apply update
157
- await NativeUpdate.reload();
158
- }
159
-
160
- // Verify
161
- const current = await NativeUpdate.current();
162
- console.log('Updated to:', current.version);
163
- }
164
- ```
165
-
166
- ### 5. Error Handling Testing
167
-
168
- #### Network Failures
169
- ```typescript
170
- // Test offline behavior
171
- await NativeUpdate.sync()
172
- .catch(error => {
173
- expect(error.code).toBe('NETWORK_ERROR');
174
- });
175
- ```
176
-
177
- #### Corrupted Bundles
178
- ```typescript
179
- // Test checksum validation
180
- await NativeUpdate.download({
181
- version: 'corrupted-version'
182
- })
183
- .catch(error => {
184
- expect(error.code).toBe('CHECKSUM_ERROR');
185
- });
186
- ```
187
-
188
- ### 6. Rollback Testing
189
-
190
- ```typescript
191
- // Test rollback mechanism
192
- async function testRollback() {
193
- // Set bad update
194
- await NativeUpdate.set(badUpdate);
195
-
196
- // Simulate app crash
197
- await simulateCrash();
198
-
199
- // Verify rollback on restart
200
- const version = await NativeUpdate.current();
201
- expect(version.version).toBe(previousVersion);
202
- }
203
- ```
204
-
205
- ### 7. Platform-Specific Testing
206
-
207
- #### iOS Specific
208
- - Test with different iOS versions (13+)
209
- - Verify App Store redirect
210
- - Test StoreKit integration
211
- - Check background fetch
212
-
213
- #### Android Specific
214
- - Test with different Android versions (5.0+)
215
- - Verify Play Core integration
216
- - Test notification permissions
217
- - Check WorkManager scheduling
218
-
219
- ### 8. Automated Verification
220
-
221
- #### CI/CD Integration
222
- ```yaml
223
- # .github/workflows/ci.yml
224
- name: CI
225
- on: [push, pull_request]
226
-
227
- jobs:
228
- build:
229
- runs-on: ubuntu-latest
230
- steps:
231
- - uses: actions/checkout@v2
232
- - uses: actions/setup-node@v2
233
- - run: yarn install
234
- - run: yarn lint
235
- - run: yarn build
236
- ```
237
-
238
- ### 9. Manual Testing Checklist
239
-
240
- - [ ] **Configuration**
241
- - [ ] Valid HTTPS URL required
242
- - [ ] Invalid configs rejected
243
- - [ ] Channel switching works
244
-
245
- - [ ] **Update Sync**
246
- - [ ] Returns correct sync status
247
- - [ ] Respects version constraints
248
- - [ ] Handles network errors
249
-
250
- - [ ] **Download**
251
- - [ ] Progress updates work
252
- - [ ] Pause/resume functionality
253
- - [ ] Checksum validation
254
- - [ ] Signature verification
255
-
256
- - [ ] **Installation**
257
- - [ ] Update applies correctly
258
- - [ ] App restarts properly
259
- - [ ] Rollback on failure
260
-
261
- - [ ] **Native Updates**
262
- - [ ] App store redirect works
263
- - [ ] Version comparison accurate
264
- - [ ] Update UI displays correctly
265
-
266
- - [ ] **App Reviews**
267
- - [ ] Review prompt appears
268
- - [ ] Rate limiting works
269
- - [ ] Platform APIs called correctly
270
-
271
- ## Testing Tools
272
-
273
- ### Bundle Testing
274
- ```bash
275
- # Create test bundle
276
- npx native-update bundle create ./test-www
277
-
278
- # Verify bundle
279
- unzip -t test-bundle.zip
280
-
281
- # Check signature
282
- openssl dgst -sha256 -verify public-key.pem -signature bundle.sig bundle.zip
283
- ```
284
-
285
- ### Server Testing
286
- ```bash
287
- # Test update check
288
- curl http://localhost:3000/api/updates/check/com.example.app/web/1.0.0
289
-
290
- # Test analytics
291
- curl -X POST http://localhost:3000/api/analytics/event \
292
- -H "Content-Type: application/json" \
293
- -d '{"appId":"com.example.app","eventType":"update_check"}'
294
- ```
295
-
296
- ### Load Testing
297
- ```bash
298
- # Install artillery
299
- yarn install -g artillery
300
-
301
- # Run load test
302
- artillery quick --count 100 --num 10 \
303
- http://localhost:3000/api/updates/check/app/web/1.0.0
304
- ```
305
-
306
- ## Debugging
307
-
308
- ### Enable Debug Logging
309
- ```typescript
310
- NativeUpdate.configure({
311
- debug: true,
312
- logLevel: 'verbose',
313
- });
314
- ```
315
-
316
- ### Native Platform Debugging
317
-
318
- **iOS:**
319
- - Use Xcode console
320
- - Enable network debugging
321
- - Check device logs
322
-
323
- **Android:**
324
- - Use Logcat in Android Studio
325
- - Enable USB debugging
326
- - Monitor network traffic
327
-
328
- ## Common Issues
329
-
330
- ### Issue: Updates Not Detected
331
- - Verify server is running
332
- - Check version numbers
333
- - Ensure HTTPS is used
334
- - Check CORS configuration
335
-
336
- ### Issue: Download Fails
337
- - Check network connectivity
338
- - Verify bundle URL
339
- - Check file permissions
340
- - Monitor server logs
341
-
342
- ### Issue: Signature Verification Fails
343
- - Ensure keys match
344
- - Check base64 encoding
345
- - Verify bundle integrity
346
- - Update public key in app