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.
Files changed (206) 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/cli/AGENTS.md +1 -1
  6. package/cli/CLAUDE.md +1 -1
  7. package/cli/commands/bundle-create.js +2 -2
  8. package/cli/index.js +11 -0
  9. package/dist/esm/definitions.d.ts +8 -0
  10. package/dist/esm/plugin.js +16 -2
  11. package/dist/plugin.cjs.js +1 -1
  12. package/dist/plugin.esm.js +1 -1
  13. package/dist/plugin.js +2 -2
  14. package/docs/CHANGELOG.md +90 -0
  15. package/docs/KNOWN_LIMITATIONS.md +2 -2
  16. package/docs/MIGRATION.md +1 -1
  17. package/ios/Plugin/LiveUpdate/LiveUpdatePlugin.swift +64 -8
  18. package/ios/Plugin/NativeUpdatePlugin.swift +39 -13
  19. package/package.json +8 -3
  20. package/docs/AGENTS.md +0 -47
  21. package/docs/APP_REVIEW_GUIDE.md +0 -768
  22. package/docs/BUNDLE_SIGNING.md +0 -277
  23. package/docs/CLAUDE.md +0 -110
  24. package/docs/COMPREHENSIVE_AUDIT_REPORT.md +0 -526
  25. package/docs/DEPLOY_NOTES.md +0 -116
  26. package/docs/EXAMPLE_APPS_SIMPLIFICATION_PLAN.md +0 -384
  27. package/docs/EXAMPLE_APPS_SIMPLIFICATION_TRACKER.md +0 -390
  28. package/docs/LIVE_UPDATES_GUIDE.md +0 -675
  29. package/docs/MANUAL-TASKS.md +0 -30
  30. package/docs/MARKETING_WEBSITE_TRACKER.md +0 -677
  31. package/docs/NATIVE_UPDATES_GUIDE.md +0 -695
  32. package/docs/PACKAGES.md +0 -167
  33. package/docs/PERFORMANCE.md +0 -110
  34. package/docs/PROJECT_COMPLETION_TRACKER.md +0 -411
  35. package/docs/QUICK_START.md +0 -595
  36. package/docs/README.md +0 -130
  37. package/docs/REMAINING_FEATURES.md +0 -192
  38. package/docs/ROADMAP.md +0 -295
  39. package/docs/SECURITY-IF-REPO-PUBLIC.md +0 -232
  40. package/docs/SECURITY.md +0 -356
  41. package/docs/TESTING_REQUIREMENTS.md +0 -201
  42. package/docs/ai-knowledge-base/00-project-profile.md +0 -38
  43. package/docs/ai-knowledge-base/01-features.md +0 -46
  44. package/docs/ai-knowledge-base/02-routes.md +0 -72
  45. package/docs/ai-knowledge-base/03-tech-stack.md +0 -57
  46. package/docs/ai-knowledge-base/README.md +0 -23
  47. package/docs/analytics-tracking.md +0 -37
  48. package/docs/api/API.md +0 -558
  49. package/docs/api/FEATURES.md +0 -414
  50. package/docs/api/app-review-api.md +0 -239
  51. package/docs/api/app-update-api.md +0 -154
  52. package/docs/api/background-update-api.md +0 -170
  53. package/docs/api/events-api.md +0 -323
  54. package/docs/api/live-update-api.md +0 -258
  55. package/docs/archive/MARKETING_WEBSITE_PLAN.md +0 -659
  56. package/docs/background-updates.md +0 -392
  57. package/docs/capacitor-official-plugins.md +0 -46
  58. package/docs/capawesome-plugins.md +0 -29
  59. package/docs/cli-reference.md +0 -321
  60. package/docs/deployment/HOSTINGER_DEPLOY.md +0 -370
  61. package/docs/deployment/PRODUCTION-DEPLOY-CHECKLIST.md +0 -184
  62. package/docs/docs-site/plan.md +0 -201
  63. package/docs/docs-site/scope.md +0 -127
  64. package/docs/docs-site/tracker.json +0 -235
  65. package/docs/error-handling-tracking.md +0 -37
  66. package/docs/examples/advanced-scenarios.md +0 -394
  67. package/docs/examples/android-manifest-example.xml +0 -77
  68. package/docs/examples/basic-usage.md +0 -206
  69. package/docs/examples/node-express-backend-example.md +0 -28
  70. package/docs/examples/react-capacitor-example.md +0 -29
  71. package/docs/features/app-reviews.md +0 -975
  72. package/docs/features/app-updates.md +0 -785
  73. package/docs/features/e2e-full-verification/00-overview.md +0 -99
  74. package/docs/features/e2e-full-verification/00-tracker.json +0 -284
  75. package/docs/features/e2e-full-verification/phase01-backend-schema-fixes.md +0 -183
  76. package/docs/features/e2e-full-verification/phase02-test-auth.md +0 -176
  77. package/docs/features/e2e-full-verification/phase03-api-test-coverage.md +0 -63
  78. package/docs/features/e2e-full-verification/phase04-frontend-package-contract-audit.md +0 -73
  79. package/docs/features/e2e-full-verification/phase05-browser-e2e-matrix.md +0 -69
  80. package/docs/features/e2e-full-verification/phase06-deploy-prod-smoke.md +0 -51
  81. package/docs/features/e2e-full-verification/results/phase01-drift-report.md +0 -50
  82. package/docs/features/e2e-full-verification/results/phase03-coverage-matrix.md +0 -215
  83. package/docs/features/e2e-full-verification/results/phase04-frontend-contract.md +0 -139
  84. package/docs/features/e2e-full-verification/results/phase05-e2e-results.md +0 -99
  85. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-01-dashboard.png +0 -0
  86. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-02-signup.png +0 -0
  87. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-03-settings-persisted.png +0 -0
  88. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-04a-app-created.png +0 -0
  89. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-04b-duplicate-bundle-422.png +0 -0
  90. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-05-plan-limit-403.png +0 -0
  91. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-08a-upload-graceful-fail.png +0 -0
  92. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-08b-builds-list.png +0 -0
  93. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-10-rollout-25pct.png +0 -0
  94. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-11-analytics.png +0 -0
  95. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-12-drive-disconnected.png +0 -0
  96. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-13-pricing.png +0 -0
  97. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-14-isolation-403.png +0 -0
  98. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-15a-admin-overview.png +0 -0
  99. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-15b-regular-user-admin-redirect.png +0 -0
  100. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-16a-delete-dialog.png +0 -0
  101. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-17-mobile-375.png +0 -0
  102. package/docs/features/e2e-full-verification/results/route-list.json +0 -1
  103. package/docs/features/laravel-nova-backend/ASSESSMENT-SUMMARY.md +0 -96
  104. package/docs/features/laravel-nova-backend/IMPLEMENTATION-PLAN.md +0 -504
  105. package/docs/features/laravel-nova-backend/progress-tracker.json +0 -184
  106. package/docs/features/live-updates.md +0 -642
  107. package/docs/features/queues-and-emails/00-overview.md +0 -41
  108. package/docs/features/queues-and-emails/00-tracker.json +0 -99
  109. package/docs/features/queues-and-emails/phase01-foundation.md +0 -15
  110. package/docs/features/queues-and-emails/phase02-queued-jobs.md +0 -19
  111. package/docs/features/queues-and-emails/phase03-transactional-emails.md +0 -16
  112. package/docs/features/queues-and-emails/phase04-quota-ops.md +0 -17
  113. package/docs/features/queues-and-emails/phase05-async-build-processing-DECISION.md +0 -16
  114. package/docs/features/queues-and-emails/phase06-verify-deploy.md +0 -17
  115. package/docs/getting-started/configuration.md +0 -469
  116. package/docs/getting-started/installation.md +0 -300
  117. package/docs/getting-started/quick-start.md +0 -430
  118. package/docs/guides/BACKEND_TEMPLATES_GUIDE.md +0 -183
  119. package/docs/guides/admin-panel.md +0 -268
  120. package/docs/guides/channel-management.md +0 -343
  121. package/docs/guides/dashboard-guide.md +0 -365
  122. package/docs/guides/deployment-guide.md +0 -335
  123. package/docs/guides/end-to-end-workflow.md +0 -491
  124. package/docs/guides/key-management.md +0 -284
  125. package/docs/guides/migration-from-codepush.md +0 -145
  126. package/docs/guides/security-best-practices.md +0 -1057
  127. package/docs/guides/testing-guide.md +0 -346
  128. package/docs/guides/troubleshooting.md +0 -482
  129. package/docs/package-audit.md +0 -41
  130. package/docs/plans/PLANNING_COMPLETE_SUMMARY.md +0 -361
  131. package/docs/plans/TASK_1_ANDROID_EXAMPLE_APP.md +0 -401
  132. package/docs/plans/TASK_2_API_ENDPOINTS.md +0 -856
  133. package/docs/plans/TASK_2_DASHBOARD_UI_UX.md +0 -820
  134. package/docs/plans/TASK_2_DATABASE_SCHEMA.md +0 -704
  135. package/docs/plans/TASK_2_GOOGLE_DRIVE_INTEGRATION.md +0 -646
  136. package/docs/plans/TASK_2_SAAS_ARCHITECTURE.md +0 -587
  137. package/docs/plans/TASK_2_USER_AUTHENTICATION.md +0 -600
  138. package/docs/play-store/ASO-METADATA.md +0 -5
  139. package/docs/play-store/DATA-SAFETY.md +0 -5
  140. package/docs/play-store/DECLARATIONS.md +0 -5
  141. package/docs/play-store/README.md +0 -27
  142. package/docs/play-store/RELEASE-NOTES.md +0 -99
  143. package/docs/play-store/RELEASE-STEPS.md +0 -6
  144. package/docs/play-store/STORE-LISTING.md +0 -7
  145. package/docs/play-store/SUBMISSION-CHECKLIST.md +0 -5
  146. package/docs/production-readiness.md +0 -475
  147. package/docs/project-audit/2026-05-16/00-FINALIZATION-PLAN.md +0 -123
  148. package/docs/project-audit/2026-05-16/01-BATCH-PLAN.md +0 -227
  149. package/docs/project-audit/2026-05-16/02-AUDIT-FINDINGS.md +0 -144
  150. package/docs/project-audit/2026-05-16/sessions/batch-01.md +0 -42
  151. package/docs/project-audit/2026-05-16/sessions/batch-02.md +0 -74
  152. package/docs/project-audit/2026-05-16/sessions/batch-03.md +0 -71
  153. package/docs/project-audit/2026-05-16/sessions/batch-04.md +0 -88
  154. package/docs/project-audit/2026-05-16/sessions/batch-05.md +0 -63
  155. package/docs/project-audit/2026-05-16/sessions/batch-06.md +0 -103
  156. package/docs/project-audit/2026-05-16/sessions/batch-07.md +0 -61
  157. package/docs/project-audit/2026-05-16/sessions/batch-08.md +0 -101
  158. package/docs/project-audit/2026-05-16/sessions/batch-09.md +0 -105
  159. package/docs/project-audit/2026-05-16/sessions/batch-10.md +0 -102
  160. package/docs/project-audit/AUDIT-HISTORY.md +0 -74
  161. package/docs/project-audit/BATCH-PLAN.md +0 -168
  162. package/docs/project-audit/MARKETING-WEBSITE-FINDINGS-2026-05-11.md +0 -73
  163. package/docs/project-audit/PRODUCTION-READINESS-AUDIT-2026-05-08.md +0 -275
  164. package/docs/project-finalization/00-tracker.json +0 -60
  165. package/docs/project-knowledge-base/01-system-overview.md +0 -227
  166. package/docs/project-knowledge-base/02-routes-pages-forms-users.md +0 -352
  167. package/docs/project-knowledge-base/03-tech-stack-modules-services.md +0 -379
  168. package/docs/project-knowledge-base/04-data-models-integrations.md +0 -244
  169. package/docs/project-knowledge-base/05-docs-corpus-inventory.md +0 -256
  170. package/docs/project-knowledge-base/06-operations-testing-legal-content.md +0 -208
  171. package/docs/project-knowledge-base/README.md +0 -103
  172. package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-05-19.md +0 -81
  173. package/docs/reports/AUDIT_SUMMARY_2025-12-26.md +0 -203
  174. package/docs/reports/CLAUDE-CODE-COMPLETION-PROMPT.md +0 -403
  175. package/docs/reports/CLAUDE_CODE_PROMPT.md +0 -29
  176. package/docs/reports/CODEBASE_STATUS_REPORT.md +0 -272
  177. package/docs/reports/COMPLETE_VERIFICATION.md +0 -106
  178. package/docs/reports/COMPREHENSIVE-PROJECT-AUDIT-2026-02-24.md +0 -747
  179. package/docs/reports/EVENT_FLOW_VERIFICATION.md +0 -80
  180. package/docs/reports/EXAMPLE_APPS_SIMPLIFICATION_COMPLETE.md +0 -369
  181. package/docs/reports/FINAL_STATUS.md +0 -122
  182. package/docs/reports/FINAL_VERIFICATION_CHECKLIST.md +0 -425
  183. package/docs/reports/MARKETING_WEBSITE_COMPLETE.md +0 -466
  184. package/docs/reports/PACKAGE_COMPLETENESS_REPORT.md +0 -130
  185. package/docs/reports/PRODUCTION_STATUS.md +0 -115
  186. package/docs/reports/PROJECT_RESTRUCTURE_2025-12-27.md +0 -287
  187. package/docs/reports/PROJECT_RESTRUCTURE_FINAL_SUMMARY.md +0 -464
  188. package/docs/reports/PUBLISHING_VERIFICATION.md +0 -144
  189. package/docs/reports/RELEASE_READY_SUMMARY.md +0 -99
  190. package/docs/reports/claude-completion.json +0 -241
  191. package/docs/rules-tracker.md +0 -102
  192. package/docs/security/PRE-LAUNCH-PENTEST-CHECKLIST.md +0 -116
  193. package/docs/security/certificate-pinning.md +0 -122
  194. package/docs/seo-aeo-rules.json +0 -3043
  195. package/docs/social-media-marketing/README.md +0 -81
  196. package/docs/social-media-marketing/posts-batch-01.md +0 -613
  197. package/docs/social-media-marketing/posts-batch-02.md +0 -528
  198. package/docs/social-media-marketing/whatsapp-messages-batch-01.md +0 -458
  199. package/docs/social-media-marketing/whatsapp-status-batch-01.md +0 -355
  200. package/docs/tracking/IMPLEMENTATION_TRACKER.md +0 -303
  201. package/docs/tracking/capacitor-rollout-note-2026-03-01.md +0 -21
  202. package/docs/tracking/completion-tracker-2026-02-24.json +0 -174
  203. package/docs/tracking/finalization-2026-05-16-tracker.json +0 -346
  204. package/docs/tracking/full-audit-tracker.json +0 -121
  205. package/docs/tracking/production-readiness-audit-tracker.json +0 -429
  206. package/docs/tracking/seo-checklist-tracker.json +0 -333
@@ -1,491 +0,0 @@
1
- # End-to-End Workflow Guide
2
-
3
- This guide walks you through the complete workflow from setting up Native Update to deploying your first OTA update to production users.
4
-
5
- ## Overview
6
-
7
- ```
8
- ┌─────────────────────────────────────────────────────────────────────┐
9
- │ Native Update Workflow │
10
- ├─────────────────────────────────────────────────────────────────────┤
11
- │ │
12
- │ 1. SETUP 2. INTEGRATE 3. BUILD & UPLOAD │
13
- │ ┌─────────┐ ┌─────────────┐ ┌──────────────────┐ │
14
- │ │Dashboard│ → │ App Code │ → │ Dashboard Upload │ │
15
- │ │ Account │ │ Integration │ │ or CLI │ │
16
- │ └─────────┘ └─────────────┘ └──────────────────┘ │
17
- │ │
18
- │ 4. TEST 5. ROLLOUT 6. MONITOR │
19
- │ ┌─────────┐ ┌─────────────┐ ┌──────────────────┐ │
20
- │ │Dev/Stage│ → │ Production │ → │ Analytics & │ │
21
- │ │ Testing │ │ Deployment │ │ Rollback │ │
22
- │ └─────────┘ └─────────────┘ └──────────────────┘ │
23
- │ │
24
- └─────────────────────────────────────────────────────────────────────┘
25
- ```
26
-
27
- ## Prerequisites
28
-
29
- Before starting, ensure you have:
30
-
31
- - [ ] A Capacitor app (React, Vue, Angular, or vanilla JS)
32
- - [ ] Node.js 18+ installed
33
- - [ ] yarn package manager
34
- - [ ] Google account (for dashboard login)
35
-
36
- ## Phase 1: Dashboard Setup (10 minutes)
37
-
38
- ### Step 1.1: Create Dashboard Account
39
-
40
- 1. Visit [nativeupdate.aoneahsan.com](https://nativeupdate.aoneahsan.com)
41
- 2. Click **Get Started**
42
- 3. Sign in with Google
43
- 4. Complete onboarding
44
-
45
- ### Step 1.2: Connect Google Drive
46
-
47
- 1. Go to **Dashboard > Google Drive**
48
- 2. Click **Connect Google Drive**
49
- 3. Grant permissions
50
- 4. Verify connection is active (green status)
51
-
52
- ### Step 1.3: Create Your App
53
-
54
- 1. Go to **Dashboard > Apps**
55
- 2. Click **Create App**
56
- 3. Enter details:
57
- ```
58
- App Name: My Awesome App
59
- Package ID: com.example.myawesomeapp
60
- Description: A sample app with OTA updates
61
- Platforms: [x] iOS [x] Android [x] Web
62
- ```
63
- 4. Click **Create App**
64
-
65
- ### Step 1.4: Note Your Configuration
66
-
67
- 1. Go to **Dashboard > Configuration**
68
- 2. Select your app
69
- 3. Copy the Capacitor configuration (you'll need this later)
70
-
71
- ## Phase 2: App Integration (15 minutes)
72
-
73
- ### Step 2.1: Install the Plugin
74
-
75
- ```bash
76
- # Navigate to your Capacitor project
77
- cd my-capacitor-app
78
-
79
- # Install the plugin
80
- yarn add native-update
81
-
82
- # Sync with native platforms
83
- npx cap sync
84
- ```
85
-
86
- ### Step 2.2: Configure Capacitor
87
-
88
- Update `capacitor.config.ts`:
89
-
90
- ```typescript
91
- import { CapacitorConfig } from '@capacitor/cli';
92
-
93
- const config: CapacitorConfig = {
94
- appId: 'com.example.myawesomeapp',
95
- appName: 'My Awesome App',
96
- webDir: 'dist',
97
- plugins: {
98
- NativeUpdate: {
99
- appId: 'com.example.myawesomeapp',
100
- updateUrl: 'https://nativeupdate.aoneahsan.com/api/updates',
101
- channel: 'production',
102
- autoCheck: true,
103
- checkInterval: 3600,
104
- updateStrategy: 'background'
105
- }
106
- }
107
- };
108
-
109
- export default config;
110
- ```
111
-
112
- ### Step 2.3: Initialize in Your App
113
-
114
- Create `src/services/update-service.ts`:
115
-
116
- ```typescript
117
- import { NativeUpdate } from 'native-update';
118
-
119
- export const updateService = {
120
- async initialize() {
121
- // Configure the plugin
122
- await NativeUpdate.configure({
123
- updateUrl: 'https://nativeupdate.aoneahsan.com/api/updates',
124
- autoCheck: true,
125
- });
126
-
127
- // Set up event listeners
128
- NativeUpdate.addListener('updateAvailable', (info) => {
129
- console.log('Update available:', info.version);
130
- this.promptUpdate(info);
131
- });
132
-
133
- NativeUpdate.addListener('downloadProgress', (progress) => {
134
- console.log(`Download: ${progress.percent}%`);
135
- });
136
-
137
- NativeUpdate.addListener('updateReady', () => {
138
- console.log('Update ready to install');
139
- });
140
-
141
- // Check for updates on startup
142
- await this.checkForUpdates();
143
- },
144
-
145
- async checkForUpdates() {
146
- try {
147
- const result = await NativeUpdate.sync();
148
-
149
- if (result.status === 'UPDATE_AVAILABLE') {
150
- return result;
151
- }
152
-
153
- return null;
154
- } catch (error) {
155
- console.error('Update check failed:', error);
156
- return null;
157
- }
158
- },
159
-
160
- async promptUpdate(updateInfo: any) {
161
- // Show your custom UI or use native dialog
162
- const shouldUpdate = confirm(
163
- `Version ${updateInfo.version} is available. Update now?`
164
- );
165
-
166
- if (shouldUpdate) {
167
- await this.downloadAndInstall();
168
- }
169
- },
170
-
171
- async downloadAndInstall() {
172
- try {
173
- // Download is handled by sync, just reload
174
- await NativeUpdate.reload();
175
- } catch (error) {
176
- console.error('Update failed:', error);
177
- }
178
- },
179
- };
180
- ```
181
-
182
- ### Step 2.4: Initialize on App Start
183
-
184
- In your main app file (e.g., `App.tsx` or `main.ts`):
185
-
186
- ```typescript
187
- import { updateService } from './services/update-service';
188
-
189
- // Initialize updates when app starts
190
- async function initApp() {
191
- await updateService.initialize();
192
- }
193
-
194
- initApp();
195
- ```
196
-
197
- ### Step 2.5: Build Your App
198
-
199
- ```bash
200
- # Build web assets
201
- yarn build
202
-
203
- # Sync to native platforms
204
- npx cap sync
205
-
206
- # Run on device/simulator to test
207
- npx cap run ios
208
- # or
209
- npx cap run android
210
- ```
211
-
212
- ## Phase 3: First Upload (5 minutes)
213
-
214
- ### Step 3.1: Build for Upload
215
-
216
- ```bash
217
- # Create production build
218
- yarn build
219
- ```
220
-
221
- ### Step 3.2: Upload via Dashboard
222
-
223
- 1. Go to **Dashboard > Upload**
224
- 2. Select your app
225
- 3. Select **development** channel (for initial testing)
226
- 4. Select your platform
227
- 5. Upload your `dist` folder as a ZIP:
228
- ```bash
229
- # Create ZIP of your build
230
- cd dist && zip -r ../build-v1.0.0.zip . && cd ..
231
- ```
232
- 6. Enter version details:
233
- ```
234
- Version: 1.0.0
235
- Build Number: 1
236
- Release Notes: Initial release with OTA support
237
- Release Type: major
238
- ```
239
- 7. Click **Upload Build**
240
-
241
- ### Step 3.3: Verify Upload
242
-
243
- 1. Go to **Dashboard > Builds**
244
- 2. Confirm your build appears with status "active"
245
-
246
- ## Phase 4: Testing (10 minutes)
247
-
248
- ### Step 4.1: Test on Development Channel
249
-
250
- 1. Ensure your app is configured for `channel: 'development'`
251
- 2. Run the app on a device/simulator
252
- 3. The app should detect no updates (you're on latest)
253
-
254
- ### Step 4.2: Make a Change
255
-
256
- 1. Edit something visible in your app (e.g., change a title)
257
- 2. Rebuild: `yarn build`
258
- 3. Upload as version 1.0.1 to development channel
259
-
260
- ### Step 4.3: Verify Update Works
261
-
262
- 1. Reopen your app (or wait for auto-check)
263
- 2. App should detect update available
264
- 3. Accept the update
265
- 4. App reloads with new changes
266
- 5. Verify your change is visible
267
-
268
- ### Step 4.4: Test Rollback (Optional)
269
-
270
- 1. Make a breaking change that crashes the app
271
- 2. Upload as version 1.0.2
272
- 3. The plugin should automatically rollback to 1.0.1
273
-
274
- ## Phase 5: Staging Deployment
275
-
276
- ### Step 5.1: Upload to Staging
277
-
278
- 1. Once development testing passes
279
- 2. Go to **Dashboard > Upload**
280
- 3. Upload the same build to **staging** channel
281
- 4. Version: Keep same version (1.0.1)
282
-
283
- ### Step 5.2: Configure Staging Testers
284
-
285
- 1. Build app with `channel: 'staging'`
286
- 2. Distribute to QA team via TestFlight/Firebase Distribution
287
- 3. They will receive staging updates
288
-
289
- ### Step 5.3: QA Validation
290
-
291
- Have testers verify:
292
- - [ ] Update is detected
293
- - [ ] Download completes successfully
294
- - [ ] App reloads correctly
295
- - [ ] All features work as expected
296
- - [ ] No crashes or errors
297
-
298
- ## Phase 6: Production Deployment
299
-
300
- ### Step 6.1: Upload to Production
301
-
302
- 1. Go to **Dashboard > Upload**
303
- 2. Upload to **production** channel
304
- 3. Double-check version and release notes
305
-
306
- ### Step 6.2: Create Gradual Rollout
307
-
308
- 1. Go to **Dashboard > Rollouts**
309
- 2. Click **Create Rollout**
310
- 3. Select your app and production channel
311
- 4. Set initial percentage: **10%**
312
- 5. Click **Start Rollout**
313
-
314
- ### Step 6.3: Monitor Initial Rollout
315
-
316
- Wait 24-48 hours and check:
317
- - **Analytics**: View download and install rates
318
- - **Errors**: Check for any reported errors
319
- - **Rollbacks**: Monitor rollback rate (should be <1%)
320
-
321
- ### Step 6.4: Expand Rollout
322
-
323
- If metrics are healthy:
324
- 1. Go to **Dashboard > Rollouts**
325
- 2. Increase to **50%**
326
- 3. Monitor for another 24 hours
327
- 4. Increase to **100%** to complete
328
-
329
- ## Phase 7: Ongoing Maintenance
330
-
331
- ### Regular Update Cycle
332
-
333
- ```
334
- 1. Develop features/fixes
335
- ↓
336
- 2. Build and test locally
337
- ↓
338
- 3. Upload to development
339
- ↓
340
- 4. Internal testing
341
- ↓
342
- 5. Upload to staging
343
- ↓
344
- 6. QA testing
345
- ↓
346
- 7. Upload to production
347
- ↓
348
- 8. Gradual rollout (10% → 50% → 100%)
349
- ↓
350
- 9. Monitor analytics
351
- ```
352
-
353
- ### Monitoring Checklist
354
-
355
- Daily:
356
- - [ ] Check error rates in Analytics
357
- - [ ] Review any reported issues
358
- - [ ] Monitor rollback rates
359
-
360
- Weekly:
361
- - [ ] Review overall success rates
362
- - [ ] Plan upcoming updates
363
- - [ ] Archive old builds
364
-
365
- Monthly:
366
- - [ ] Audit channel configurations
367
- - [ ] Review security settings
368
- - [ ] Check storage usage
369
-
370
- ## Complete Code Example
371
-
372
- Here's a complete React example:
373
-
374
- ```typescript
375
- // src/App.tsx
376
- import { useEffect, useState } from 'react';
377
- import { NativeUpdate } from 'native-update';
378
-
379
- function App() {
380
- const [updateStatus, setUpdateStatus] = useState<string>('Checking...');
381
- const [version, setVersion] = useState<string>('1.0.0');
382
-
383
- useEffect(() => {
384
- initializeUpdates();
385
- }, []);
386
-
387
- async function initializeUpdates() {
388
- try {
389
- // Configure
390
- await NativeUpdate.configure({
391
- updateUrl: 'https://nativeupdate.aoneahsan.com/api/updates',
392
- autoCheck: true,
393
- });
394
-
395
- // Get current version
396
- const info = await NativeUpdate.getCurrentBundle();
397
- setVersion(info.version || '1.0.0');
398
-
399
- // Set up listeners
400
- NativeUpdate.addListener('updateAvailable', (info) => {
401
- setUpdateStatus(`Update ${info.version} available!`);
402
- });
403
-
404
- NativeUpdate.addListener('downloadProgress', (progress) => {
405
- setUpdateStatus(`Downloading: ${progress.percent}%`);
406
- });
407
-
408
- // Check for updates
409
- const result = await NativeUpdate.sync();
410
-
411
- if (result.status === 'UPDATE_AVAILABLE') {
412
- setUpdateStatus('Update available');
413
- } else if (result.status === 'UP_TO_DATE') {
414
- setUpdateStatus('Up to date');
415
- }
416
- } catch (error) {
417
- setUpdateStatus('Error checking updates');
418
- console.error(error);
419
- }
420
- }
421
-
422
- async function handleUpdate() {
423
- try {
424
- setUpdateStatus('Installing...');
425
- await NativeUpdate.reload();
426
- } catch (error) {
427
- setUpdateStatus('Update failed');
428
- }
429
- }
430
-
431
- return (
432
- <div className="app">
433
- <h1>My App v{version}</h1>
434
- <p>Status: {updateStatus}</p>
435
-
436
- {updateStatus.includes('available') && (
437
- <button onClick={handleUpdate}>
438
- Install Update
439
- </button>
440
- )}
441
-
442
- {/* Change this text to test OTA updates! */}
443
- <p>Welcome to my awesome app!</p>
444
- </div>
445
- );
446
- }
447
-
448
- export default App;
449
- ```
450
-
451
- ## Troubleshooting
452
-
453
- ### Update Not Detected
454
-
455
- 1. Check network connectivity
456
- 2. Verify channel configuration matches
457
- 3. Check build is uploaded to correct channel
458
- 4. Try manual sync: `await NativeUpdate.sync()`
459
-
460
- ### Download Fails
461
-
462
- 1. Check internet connection
463
- 2. Verify Google Drive is connected
464
- 3. Check file isn't corrupted
465
- 4. Try re-uploading the build
466
-
467
- ### App Crashes After Update
468
-
469
- 1. Plugin should auto-rollback
470
- 2. Check error logs
471
- 3. Verify build was tested properly
472
- 4. Upload a fixed version
473
-
474
- ### Rollout Not Progressing
475
-
476
- 1. Check rollout status in dashboard
477
- 2. Verify percentage is set correctly
478
- 3. Ensure enough users to hit percentage
479
-
480
- ## Next Steps
481
-
482
- - [Channel Management](https://nativeupdate.aoneahsan.com/docs/guides/channel-management) - Advanced channel configuration
483
- - [Dashboard Guide](https://nativeupdate.aoneahsan.com/docs/guides/dashboard-guide) - Full dashboard documentation
484
- - [Security Best Practices](https://nativeupdate.aoneahsan.com/docs/guides/security-best-practices) - Secure your updates
485
- - [API Reference](https://nativeupdate.aoneahsan.com/docs/api/API) - Complete API documentation
486
-
487
- ## Support
488
-
489
- Need help? Contact us:
490
- - Email: aoneahsan@gmail.com
491
- - Website: [nativeupdate.aoneahsan.com](https://nativeupdate.aoneahsan.com)