native-update 3.1.2 → 3.1.4
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/AI-INTEGRATION-GUIDE.md +15 -10
- package/Readme.md +35 -35
- package/android/src/main/java/com/aoneahsan/nativeupdate/LiveUpdatePlugin.kt +88 -12
- package/android/src/main/java/com/aoneahsan/nativeupdate/NativeUpdatePlugin.kt +45 -18
- package/cli/AGENTS.md +1 -1
- package/cli/CLAUDE.md +1 -1
- package/cli/commands/bundle-create.js +2 -2
- package/cli/index.js +11 -0
- package/dist/esm/definitions.d.ts +8 -0
- package/dist/esm/plugin.js +16 -2
- package/dist/plugin.cjs.js +1 -1
- package/dist/plugin.esm.js +1 -1
- package/dist/plugin.js +2 -2
- package/docs/CHANGELOG.md +90 -0
- package/docs/KNOWN_LIMITATIONS.md +2 -2
- package/docs/MIGRATION.md +1 -1
- package/ios/Plugin/LiveUpdate/LiveUpdatePlugin.swift +64 -8
- package/ios/Plugin/NativeUpdatePlugin.swift +39 -13
- package/package.json +8 -3
- package/docs/AGENTS.md +0 -47
- package/docs/APP_REVIEW_GUIDE.md +0 -768
- package/docs/BUNDLE_SIGNING.md +0 -277
- package/docs/CLAUDE.md +0 -110
- package/docs/COMPREHENSIVE_AUDIT_REPORT.md +0 -526
- package/docs/DEPLOY_NOTES.md +0 -116
- package/docs/EXAMPLE_APPS_SIMPLIFICATION_PLAN.md +0 -384
- package/docs/EXAMPLE_APPS_SIMPLIFICATION_TRACKER.md +0 -390
- package/docs/LIVE_UPDATES_GUIDE.md +0 -675
- package/docs/MANUAL-TASKS.md +0 -30
- package/docs/MARKETING_WEBSITE_TRACKER.md +0 -677
- package/docs/NATIVE_UPDATES_GUIDE.md +0 -695
- package/docs/PACKAGES.md +0 -167
- package/docs/PERFORMANCE.md +0 -110
- package/docs/PROJECT_COMPLETION_TRACKER.md +0 -411
- package/docs/QUICK_START.md +0 -595
- package/docs/README.md +0 -130
- package/docs/REMAINING_FEATURES.md +0 -192
- package/docs/ROADMAP.md +0 -295
- package/docs/SECURITY-IF-REPO-PUBLIC.md +0 -232
- package/docs/SECURITY.md +0 -356
- package/docs/TESTING_REQUIREMENTS.md +0 -201
- package/docs/ai-knowledge-base/00-project-profile.md +0 -38
- package/docs/ai-knowledge-base/01-features.md +0 -46
- package/docs/ai-knowledge-base/02-routes.md +0 -72
- package/docs/ai-knowledge-base/03-tech-stack.md +0 -57
- package/docs/ai-knowledge-base/README.md +0 -23
- package/docs/analytics-tracking.md +0 -37
- package/docs/api/API.md +0 -558
- package/docs/api/FEATURES.md +0 -414
- package/docs/api/app-review-api.md +0 -239
- package/docs/api/app-update-api.md +0 -154
- package/docs/api/background-update-api.md +0 -170
- package/docs/api/events-api.md +0 -323
- package/docs/api/live-update-api.md +0 -258
- package/docs/archive/MARKETING_WEBSITE_PLAN.md +0 -659
- package/docs/background-updates.md +0 -392
- package/docs/capacitor-official-plugins.md +0 -46
- package/docs/capawesome-plugins.md +0 -29
- package/docs/cli-reference.md +0 -321
- package/docs/deployment/HOSTINGER_DEPLOY.md +0 -370
- package/docs/deployment/PRODUCTION-DEPLOY-CHECKLIST.md +0 -184
- package/docs/docs-site/plan.md +0 -201
- package/docs/docs-site/scope.md +0 -127
- package/docs/docs-site/tracker.json +0 -235
- package/docs/error-handling-tracking.md +0 -37
- package/docs/examples/advanced-scenarios.md +0 -394
- package/docs/examples/android-manifest-example.xml +0 -77
- package/docs/examples/basic-usage.md +0 -206
- package/docs/examples/node-express-backend-example.md +0 -28
- package/docs/examples/react-capacitor-example.md +0 -29
- package/docs/features/app-reviews.md +0 -975
- package/docs/features/app-updates.md +0 -785
- package/docs/features/e2e-full-verification/00-overview.md +0 -99
- package/docs/features/e2e-full-verification/00-tracker.json +0 -284
- package/docs/features/e2e-full-verification/phase01-backend-schema-fixes.md +0 -183
- package/docs/features/e2e-full-verification/phase02-test-auth.md +0 -176
- package/docs/features/e2e-full-verification/phase03-api-test-coverage.md +0 -63
- package/docs/features/e2e-full-verification/phase04-frontend-package-contract-audit.md +0 -73
- package/docs/features/e2e-full-verification/phase05-browser-e2e-matrix.md +0 -69
- package/docs/features/e2e-full-verification/phase06-deploy-prod-smoke.md +0 -51
- package/docs/features/e2e-full-verification/results/phase01-drift-report.md +0 -50
- package/docs/features/e2e-full-verification/results/phase03-coverage-matrix.md +0 -215
- package/docs/features/e2e-full-verification/results/phase04-frontend-contract.md +0 -139
- package/docs/features/e2e-full-verification/results/phase05-e2e-results.md +0 -99
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-01-dashboard.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-02-signup.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-03-settings-persisted.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-04a-app-created.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-04b-duplicate-bundle-422.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-05-plan-limit-403.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-08a-upload-graceful-fail.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-08b-builds-list.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-10-rollout-25pct.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-11-analytics.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-12-drive-disconnected.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-13-pricing.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-14-isolation-403.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-15a-admin-overview.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-15b-regular-user-admin-redirect.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-16a-delete-dialog.png +0 -0
- package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-17-mobile-375.png +0 -0
- package/docs/features/e2e-full-verification/results/route-list.json +0 -1
- package/docs/features/laravel-nova-backend/ASSESSMENT-SUMMARY.md +0 -96
- package/docs/features/laravel-nova-backend/IMPLEMENTATION-PLAN.md +0 -504
- package/docs/features/laravel-nova-backend/progress-tracker.json +0 -184
- package/docs/features/live-updates.md +0 -642
- package/docs/features/queues-and-emails/00-overview.md +0 -41
- package/docs/features/queues-and-emails/00-tracker.json +0 -99
- package/docs/features/queues-and-emails/phase01-foundation.md +0 -15
- package/docs/features/queues-and-emails/phase02-queued-jobs.md +0 -19
- package/docs/features/queues-and-emails/phase03-transactional-emails.md +0 -16
- package/docs/features/queues-and-emails/phase04-quota-ops.md +0 -17
- package/docs/features/queues-and-emails/phase05-async-build-processing-DECISION.md +0 -16
- package/docs/features/queues-and-emails/phase06-verify-deploy.md +0 -17
- package/docs/getting-started/configuration.md +0 -469
- package/docs/getting-started/installation.md +0 -300
- package/docs/getting-started/quick-start.md +0 -430
- package/docs/guides/BACKEND_TEMPLATES_GUIDE.md +0 -183
- package/docs/guides/admin-panel.md +0 -268
- package/docs/guides/channel-management.md +0 -343
- package/docs/guides/dashboard-guide.md +0 -365
- package/docs/guides/deployment-guide.md +0 -335
- package/docs/guides/end-to-end-workflow.md +0 -491
- package/docs/guides/key-management.md +0 -284
- package/docs/guides/migration-from-codepush.md +0 -145
- package/docs/guides/security-best-practices.md +0 -1057
- package/docs/guides/testing-guide.md +0 -346
- package/docs/guides/troubleshooting.md +0 -482
- package/docs/package-audit.md +0 -41
- package/docs/plans/PLANNING_COMPLETE_SUMMARY.md +0 -361
- package/docs/plans/TASK_1_ANDROID_EXAMPLE_APP.md +0 -401
- package/docs/plans/TASK_2_API_ENDPOINTS.md +0 -856
- package/docs/plans/TASK_2_DASHBOARD_UI_UX.md +0 -820
- package/docs/plans/TASK_2_DATABASE_SCHEMA.md +0 -704
- package/docs/plans/TASK_2_GOOGLE_DRIVE_INTEGRATION.md +0 -646
- package/docs/plans/TASK_2_SAAS_ARCHITECTURE.md +0 -587
- package/docs/plans/TASK_2_USER_AUTHENTICATION.md +0 -600
- package/docs/play-store/ASO-METADATA.md +0 -5
- package/docs/play-store/DATA-SAFETY.md +0 -5
- package/docs/play-store/DECLARATIONS.md +0 -5
- package/docs/play-store/README.md +0 -27
- package/docs/play-store/RELEASE-NOTES.md +0 -99
- package/docs/play-store/RELEASE-STEPS.md +0 -6
- package/docs/play-store/STORE-LISTING.md +0 -7
- package/docs/play-store/SUBMISSION-CHECKLIST.md +0 -5
- package/docs/production-readiness.md +0 -475
- package/docs/project-audit/2026-05-16/00-FINALIZATION-PLAN.md +0 -123
- package/docs/project-audit/2026-05-16/01-BATCH-PLAN.md +0 -227
- package/docs/project-audit/2026-05-16/02-AUDIT-FINDINGS.md +0 -144
- package/docs/project-audit/2026-05-16/sessions/batch-01.md +0 -42
- package/docs/project-audit/2026-05-16/sessions/batch-02.md +0 -74
- package/docs/project-audit/2026-05-16/sessions/batch-03.md +0 -71
- package/docs/project-audit/2026-05-16/sessions/batch-04.md +0 -88
- package/docs/project-audit/2026-05-16/sessions/batch-05.md +0 -63
- package/docs/project-audit/2026-05-16/sessions/batch-06.md +0 -103
- package/docs/project-audit/2026-05-16/sessions/batch-07.md +0 -61
- package/docs/project-audit/2026-05-16/sessions/batch-08.md +0 -101
- package/docs/project-audit/2026-05-16/sessions/batch-09.md +0 -105
- package/docs/project-audit/2026-05-16/sessions/batch-10.md +0 -102
- package/docs/project-audit/AUDIT-HISTORY.md +0 -74
- package/docs/project-audit/BATCH-PLAN.md +0 -168
- package/docs/project-audit/MARKETING-WEBSITE-FINDINGS-2026-05-11.md +0 -73
- package/docs/project-audit/PRODUCTION-READINESS-AUDIT-2026-05-08.md +0 -275
- package/docs/project-finalization/00-tracker.json +0 -60
- package/docs/project-knowledge-base/01-system-overview.md +0 -227
- package/docs/project-knowledge-base/02-routes-pages-forms-users.md +0 -352
- package/docs/project-knowledge-base/03-tech-stack-modules-services.md +0 -379
- package/docs/project-knowledge-base/04-data-models-integrations.md +0 -244
- package/docs/project-knowledge-base/05-docs-corpus-inventory.md +0 -256
- package/docs/project-knowledge-base/06-operations-testing-legal-content.md +0 -208
- package/docs/project-knowledge-base/README.md +0 -103
- package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-05-19.md +0 -81
- package/docs/reports/AUDIT_SUMMARY_2025-12-26.md +0 -203
- package/docs/reports/CLAUDE-CODE-COMPLETION-PROMPT.md +0 -403
- package/docs/reports/CLAUDE_CODE_PROMPT.md +0 -29
- package/docs/reports/CODEBASE_STATUS_REPORT.md +0 -272
- package/docs/reports/COMPLETE_VERIFICATION.md +0 -106
- package/docs/reports/COMPREHENSIVE-PROJECT-AUDIT-2026-02-24.md +0 -747
- package/docs/reports/EVENT_FLOW_VERIFICATION.md +0 -80
- package/docs/reports/EXAMPLE_APPS_SIMPLIFICATION_COMPLETE.md +0 -369
- package/docs/reports/FINAL_STATUS.md +0 -122
- package/docs/reports/FINAL_VERIFICATION_CHECKLIST.md +0 -425
- package/docs/reports/MARKETING_WEBSITE_COMPLETE.md +0 -466
- package/docs/reports/PACKAGE_COMPLETENESS_REPORT.md +0 -130
- package/docs/reports/PRODUCTION_STATUS.md +0 -115
- package/docs/reports/PROJECT_RESTRUCTURE_2025-12-27.md +0 -287
- package/docs/reports/PROJECT_RESTRUCTURE_FINAL_SUMMARY.md +0 -464
- package/docs/reports/PUBLISHING_VERIFICATION.md +0 -144
- package/docs/reports/RELEASE_READY_SUMMARY.md +0 -99
- package/docs/reports/claude-completion.json +0 -241
- package/docs/rules-tracker.md +0 -102
- package/docs/security/PRE-LAUNCH-PENTEST-CHECKLIST.md +0 -116
- package/docs/security/certificate-pinning.md +0 -122
- package/docs/seo-aeo-rules.json +0 -3043
- package/docs/social-media-marketing/README.md +0 -81
- package/docs/social-media-marketing/posts-batch-01.md +0 -613
- package/docs/social-media-marketing/posts-batch-02.md +0 -528
- package/docs/social-media-marketing/whatsapp-messages-batch-01.md +0 -458
- package/docs/social-media-marketing/whatsapp-status-batch-01.md +0 -355
- package/docs/tracking/IMPLEMENTATION_TRACKER.md +0 -303
- package/docs/tracking/capacitor-rollout-note-2026-03-01.md +0 -21
- package/docs/tracking/completion-tracker-2026-02-24.json +0 -174
- package/docs/tracking/finalization-2026-05-16-tracker.json +0 -346
- package/docs/tracking/full-audit-tracker.json +0 -121
- package/docs/tracking/production-readiness-audit-tracker.json +0 -429
- package/docs/tracking/seo-checklist-tracker.json +0 -333
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
# Live Update API Reference
|
|
2
|
-
|
|
3
|
-
Complete API documentation for Live/OTA update functionality.
|
|
4
|
-
|
|
5
|
-
## Methods
|
|
6
|
-
|
|
7
|
-
### configure(options)
|
|
8
|
-
|
|
9
|
-
Configure the Live Update plugin with server settings and behavior options.
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
await NativeUpdate.configure({
|
|
13
|
-
serverUrl: string; // Update server URL (required)
|
|
14
|
-
channel?: string; // Update channel (default: "production")
|
|
15
|
-
autoCheck?: boolean; // Auto-check for updates (default: true)
|
|
16
|
-
checkInterval?: number; // Check interval in seconds (default: 3600)
|
|
17
|
-
publicKey?: string; // Base64 public key for signatures
|
|
18
|
-
maxRetries?: number; // Max download retries (default: 3)
|
|
19
|
-
security?: {
|
|
20
|
-
enforceHttps?: boolean; // Require HTTPS (default: true)
|
|
21
|
-
validateSignatures?: boolean; // Verify signatures (default: true)
|
|
22
|
-
pinCertificates?: boolean; // Certificate pinning (default: false)
|
|
23
|
-
certificateHashes?: string[]; // Certificate SHA-256 hashes
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### sync(options?)
|
|
29
|
-
|
|
30
|
-
Sync with update server and apply updates based on strategy.
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
const result = await NativeUpdate.sync({
|
|
34
|
-
channel?: string; // Update channel (optional)
|
|
35
|
-
updateMode?: UpdateMode; // Update mode (optional)
|
|
36
|
-
});
|
|
37
|
-
// Returns:
|
|
38
|
-
{
|
|
39
|
-
status: SyncStatus; // 'UP_TO_DATE' | 'UPDATE_AVAILABLE' | 'UPDATE_INSTALLED' | 'ERROR'
|
|
40
|
-
version?: string; // Version if update available
|
|
41
|
-
description?: string; // Update description
|
|
42
|
-
mandatory?: boolean; // Is update mandatory
|
|
43
|
-
error?: UpdateError; // Error details if status is ERROR
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### download(options)
|
|
48
|
-
|
|
49
|
-
Download a specific bundle version.
|
|
50
|
-
|
|
51
|
-
```typescript
|
|
52
|
-
const result = await NativeUpdate.download({
|
|
53
|
-
url: string; // Bundle URL (required)
|
|
54
|
-
version: string; // Version to download (required)
|
|
55
|
-
checksum: string; // Expected SHA-256 checksum (required)
|
|
56
|
-
signature?: string; // Optional bundle signature
|
|
57
|
-
maxRetries?: number; // Max download retries
|
|
58
|
-
timeout?: number; // Download timeout in ms
|
|
59
|
-
});
|
|
60
|
-
// Returns:
|
|
61
|
-
{
|
|
62
|
-
bundleId: string; // Unique bundle ID
|
|
63
|
-
version: string; // Bundle version
|
|
64
|
-
path: string; // Local path
|
|
65
|
-
downloadTime: number; // Download timestamp
|
|
66
|
-
size: number; // File size
|
|
67
|
-
status: BundleStatus; // Bundle status
|
|
68
|
-
checksum: string; // SHA-256 checksum
|
|
69
|
-
signature?: string; // Bundle signature if provided
|
|
70
|
-
verified: boolean; // Signature verification status
|
|
71
|
-
metadata?: Record<string, unknown>; // Optional metadata
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### set(bundle)
|
|
76
|
-
|
|
77
|
-
Set the active bundle.
|
|
78
|
-
|
|
79
|
-
```typescript
|
|
80
|
-
await NativeUpdate.set({
|
|
81
|
-
bundleId: string;
|
|
82
|
-
version: string;
|
|
83
|
-
checksum: string;
|
|
84
|
-
});
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### reload()
|
|
88
|
-
|
|
89
|
-
Reload the app with current bundle.
|
|
90
|
-
|
|
91
|
-
```typescript
|
|
92
|
-
await NativeUpdate.reload();
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### current()
|
|
96
|
-
|
|
97
|
-
Get current bundle info.
|
|
98
|
-
|
|
99
|
-
```typescript
|
|
100
|
-
const bundle = await NativeUpdate.current();
|
|
101
|
-
// Returns:
|
|
102
|
-
{
|
|
103
|
-
bundleId: string;
|
|
104
|
-
version: string;
|
|
105
|
-
path: string;
|
|
106
|
-
downloadTime: number;
|
|
107
|
-
size: number;
|
|
108
|
-
status: 'ACTIVE' | 'PENDING' | 'FAILED';
|
|
109
|
-
checksum: string;
|
|
110
|
-
verified: boolean;
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### list()
|
|
115
|
-
|
|
116
|
-
List all downloaded bundles.
|
|
117
|
-
|
|
118
|
-
```typescript
|
|
119
|
-
const bundles = await NativeUpdate.list();
|
|
120
|
-
// Returns: Array<BundleInfo>
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### delete(options)
|
|
124
|
-
|
|
125
|
-
Delete bundles.
|
|
126
|
-
|
|
127
|
-
```typescript
|
|
128
|
-
await NativeUpdate.delete({
|
|
129
|
-
bundleId?: string; // Delete specific bundle
|
|
130
|
-
keepVersions?: number; // Keep N most recent versions
|
|
131
|
-
olderThan?: number; // Delete bundles older than timestamp
|
|
132
|
-
});
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### reset()
|
|
136
|
-
|
|
137
|
-
Reset to the original app bundle.
|
|
138
|
-
|
|
139
|
-
```typescript
|
|
140
|
-
await NativeUpdate.reset();
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### notifyAppReady()
|
|
144
|
-
|
|
145
|
-
Notify that the app has successfully started with the new bundle.
|
|
146
|
-
|
|
147
|
-
```typescript
|
|
148
|
-
await NativeUpdate.notifyAppReady();
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### getLatest()
|
|
152
|
-
|
|
153
|
-
Get information about the latest available update from the server.
|
|
154
|
-
|
|
155
|
-
```typescript
|
|
156
|
-
const latest = await NativeUpdate.getLatest();
|
|
157
|
-
// Returns:
|
|
158
|
-
{
|
|
159
|
-
available: boolean; // Whether an update is available
|
|
160
|
-
version?: string; // Version number of the latest update
|
|
161
|
-
url?: string; // Download URL for the update
|
|
162
|
-
mandatory?: boolean; // Whether this is a mandatory update
|
|
163
|
-
notes?: string; // Release notes for the update
|
|
164
|
-
size?: number; // Size in bytes of the update bundle
|
|
165
|
-
}
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### setChannel(channel)
|
|
169
|
-
|
|
170
|
-
Change the update channel.
|
|
171
|
-
|
|
172
|
-
```typescript
|
|
173
|
-
await NativeUpdate.setChannel(channel: string);
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### setUpdateUrl(url)
|
|
177
|
-
|
|
178
|
-
Change the update server URL.
|
|
179
|
-
|
|
180
|
-
```typescript
|
|
181
|
-
await NativeUpdate.setUpdateUrl(url: string);
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
### validateUpdate(options)
|
|
185
|
-
|
|
186
|
-
Validate a bundle's integrity.
|
|
187
|
-
|
|
188
|
-
```typescript
|
|
189
|
-
const result = await NativeUpdate.validateUpdate({
|
|
190
|
-
bundlePath: string;
|
|
191
|
-
checksum: string;
|
|
192
|
-
signature?: string;
|
|
193
|
-
});
|
|
194
|
-
// Returns:
|
|
195
|
-
{
|
|
196
|
-
isValid: boolean;
|
|
197
|
-
details: {
|
|
198
|
-
checksumValid: boolean;
|
|
199
|
-
signatureValid?: boolean;
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
## Events
|
|
205
|
-
|
|
206
|
-
### updateStateChanged
|
|
207
|
-
|
|
208
|
-
Fired when update state changes.
|
|
209
|
-
|
|
210
|
-
```typescript
|
|
211
|
-
NativeUpdate.addListener('updateStateChanged', (state) => {
|
|
212
|
-
console.log('State:', state.status);
|
|
213
|
-
// state.status: 'CHECKING' | 'DOWNLOADING' | 'READY' | 'FAILED'
|
|
214
|
-
});
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
### downloadProgress
|
|
218
|
-
|
|
219
|
-
Fired during bundle download.
|
|
220
|
-
|
|
221
|
-
```typescript
|
|
222
|
-
NativeUpdate.addListener('downloadProgress', (progress) => {
|
|
223
|
-
console.log(`Progress: ${progress.percent}%`);
|
|
224
|
-
});
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### backgroundUpdateProgress
|
|
228
|
-
|
|
229
|
-
Fired during background update operations.
|
|
230
|
-
|
|
231
|
-
```typescript
|
|
232
|
-
NativeUpdate.addListener('backgroundUpdateProgress', (progress) => {
|
|
233
|
-
console.log('Background update:', progress.status);
|
|
234
|
-
});
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### backgroundUpdateNotification
|
|
238
|
-
|
|
239
|
-
Fired when background update notifications are triggered.
|
|
240
|
-
|
|
241
|
-
```typescript
|
|
242
|
-
NativeUpdate.addListener('backgroundUpdateNotification', (notification) => {
|
|
243
|
-
console.log('Update notification:', notification.type);
|
|
244
|
-
});
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
## Error Codes
|
|
248
|
-
|
|
249
|
-
| Code | Description |
|
|
250
|
-
|------|-------------|
|
|
251
|
-
| `NETWORK_ERROR` | Network connection failed |
|
|
252
|
-
| `DOWNLOAD_ERROR` | Bundle download failed |
|
|
253
|
-
| `CHECKSUM_ERROR` | Checksum validation failed |
|
|
254
|
-
| `SIGNATURE_ERROR` | Signature verification failed |
|
|
255
|
-
| `STORAGE_ERROR` | Insufficient storage space |
|
|
256
|
-
| `PARSE_ERROR` | Invalid bundle format |
|
|
257
|
-
| `VERSION_ERROR` | Invalid version format |
|
|
258
|
-
| `INSECURE_URL` | HTTP URL when HTTPS required |
|