native-update 1.4.9 → 3.1.0

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 (265) hide show
  1. package/Readme.md +35 -9
  2. package/android/manifest-additions.xml +28 -0
  3. package/android/src/main/AndroidManifest.xml +3 -7
  4. package/android/src/main/java/com/aoneahsan/nativeupdate/BackgroundNotificationManager.kt +21 -13
  5. package/android/src/main/java/com/aoneahsan/nativeupdate/BackgroundUpdatePlugin.kt +15 -0
  6. package/android/src/main/java/com/aoneahsan/nativeupdate/BackgroundUpdateWorker.kt +23 -7
  7. package/android/src/main/java/com/aoneahsan/nativeupdate/LiveUpdatePlugin.kt +346 -31
  8. package/android/src/main/java/com/aoneahsan/nativeupdate/NativeUpdatePlugin.kt +32 -34
  9. package/android/src/main/java/com/aoneahsan/nativeupdate/NotificationActionReceiver.kt +10 -1
  10. package/android/src/main/java/com/aoneahsan/nativeupdate/SecurityManager.kt +18 -18
  11. package/cli/AGENTS.md +43 -0
  12. package/cli/CLAUDE.md +65 -0
  13. package/cli/commands/backend-create.js +56 -15
  14. package/cli/commands/bundle-create.js +39 -7
  15. package/cli/commands/monitor.js +72 -51
  16. package/cli/index.js +10 -24
  17. package/cli/package.json +11 -3
  18. package/dist/esm/app-review/app-review-manager.js +0 -1
  19. package/dist/esm/app-review/index.js +0 -1
  20. package/dist/esm/app-review/platform-review-handler.js +0 -1
  21. package/dist/esm/app-review/review-conditions-checker.js +0 -1
  22. package/dist/esm/app-review/review-rate-limiter.js +0 -1
  23. package/dist/esm/app-review/types.js +0 -1
  24. package/dist/esm/app-update/app-update-checker.js +0 -1
  25. package/dist/esm/app-update/app-update-installer.d.ts +1 -0
  26. package/dist/esm/app-update/app-update-installer.js +19 -8
  27. package/dist/esm/app-update/app-update-manager.js +0 -1
  28. package/dist/esm/app-update/app-update-notifier.js +0 -1
  29. package/dist/esm/app-update/index.js +0 -1
  30. package/dist/esm/app-update/platform-app-update.js +12 -3
  31. package/dist/esm/app-update/types.js +0 -1
  32. package/dist/esm/background-update/background-scheduler.js +0 -1
  33. package/dist/esm/background-update/index.js +0 -1
  34. package/dist/esm/background-update/notification-manager.js +0 -1
  35. package/dist/esm/config/support.js +0 -1
  36. package/dist/esm/core/analytics.d.ts +13 -0
  37. package/dist/esm/core/analytics.js +15 -1
  38. package/dist/esm/core/cache-manager.js +0 -1
  39. package/dist/esm/core/config.d.ts +6 -30
  40. package/dist/esm/core/config.js +1 -8
  41. package/dist/esm/core/errors.d.ts +1 -0
  42. package/dist/esm/core/errors.js +1 -1
  43. package/dist/esm/core/event-emitter.d.ts +0 -3
  44. package/dist/esm/core/event-emitter.js +8 -3
  45. package/dist/esm/core/logger.js +0 -1
  46. package/dist/esm/core/performance.js +0 -1
  47. package/dist/esm/core/plugin-manager.js +3 -1
  48. package/dist/esm/core/security.d.ts +22 -3
  49. package/dist/esm/core/security.js +46 -7
  50. package/dist/esm/definitions.d.ts +13 -40
  51. package/dist/esm/definitions.js +0 -1
  52. package/dist/esm/index.d.ts +3 -4
  53. package/dist/esm/index.js +3 -3
  54. package/dist/esm/live-update/bundle-manager.d.ts +8 -0
  55. package/dist/esm/live-update/bundle-manager.js +20 -1
  56. package/dist/esm/live-update/certificate-pinning.js +0 -1
  57. package/dist/esm/live-update/delta-processor.d.ts +1 -1
  58. package/dist/esm/live-update/delta-processor.js +3 -1
  59. package/dist/esm/live-update/download-manager.d.ts +36 -5
  60. package/dist/esm/live-update/download-manager.js +70 -24
  61. package/dist/esm/live-update/rollout-checker.d.ts +1 -1
  62. package/dist/esm/live-update/rollout-checker.js +5 -6
  63. package/dist/esm/live-update/update-manager.d.ts +12 -1
  64. package/dist/esm/live-update/update-manager.js +38 -11
  65. package/dist/esm/live-update/version-manager.d.ts +9 -12
  66. package/dist/esm/live-update/version-manager.js +40 -68
  67. package/dist/esm/plugin.js +82 -89
  68. package/dist/esm/security/crypto.js +11 -7
  69. package/dist/esm/security/validator.js +0 -1
  70. package/dist/esm/types/rollout.d.ts +85 -0
  71. package/dist/esm/types/rollout.js +25 -0
  72. package/dist/esm/web.d.ts +26 -1
  73. package/dist/esm/web.js +214 -75
  74. package/dist/plugin.cjs.js +1 -2
  75. package/dist/plugin.esm.js +1 -2
  76. package/dist/plugin.js +2 -3
  77. package/docs/AGENTS.md +38 -0
  78. package/docs/CHANGELOG.md +275 -0
  79. package/docs/CLAUDE.md +101 -0
  80. package/docs/MANUAL-TASKS.md +17 -0
  81. package/docs/MARKETING_WEBSITE_TRACKER.md +18 -2
  82. package/docs/MIGRATION.md +170 -0
  83. package/docs/PACKAGES.md +167 -0
  84. package/docs/PERFORMANCE.md +110 -0
  85. package/docs/PROJECT_COMPLETION_TRACKER.md +4 -35
  86. package/docs/README.md +12 -2
  87. package/docs/REMAINING_FEATURES.md +123 -76
  88. package/docs/ROADMAP.md +200 -120
  89. package/docs/SECURITY-IF-REPO-PUBLIC.md +232 -0
  90. package/docs/TESTING_REQUIREMENTS.md +1 -112
  91. package/docs/ai-knowledge-base/00-project-profile.md +38 -0
  92. package/docs/ai-knowledge-base/01-features.md +46 -0
  93. package/docs/ai-knowledge-base/02-routes.md +72 -0
  94. package/docs/ai-knowledge-base/03-tech-stack.md +57 -0
  95. package/docs/ai-knowledge-base/README.md +23 -0
  96. package/docs/analytics-tracking.md +37 -0
  97. package/docs/capacitor-official-plugins.md +46 -0
  98. package/docs/capawesome-plugins.md +29 -0
  99. package/docs/deployment/HOSTINGER_DEPLOY.md +370 -0
  100. package/docs/deployment/PRODUCTION-DEPLOY-CHECKLIST.md +184 -0
  101. package/docs/docs-site/plan.md +201 -0
  102. package/docs/docs-site/scope.md +127 -0
  103. package/docs/docs-site/tracker.json +235 -0
  104. package/docs/error-handling-tracking.md +37 -0
  105. package/docs/features/laravel-nova-backend/ASSESSMENT-SUMMARY.md +96 -0
  106. package/docs/features/laravel-nova-backend/IMPLEMENTATION-PLAN.md +504 -0
  107. package/docs/features/laravel-nova-backend/progress-tracker.json +184 -0
  108. package/docs/guides/testing-guide.md +15 -41
  109. package/docs/package-audit.md +41 -0
  110. package/docs/play-store/ASO-METADATA.md +5 -0
  111. package/docs/play-store/DATA-SAFETY.md +5 -0
  112. package/docs/play-store/DECLARATIONS.md +5 -0
  113. package/docs/play-store/README.md +27 -0
  114. package/docs/play-store/RELEASE-NOTES.md +99 -0
  115. package/docs/play-store/RELEASE-STEPS.md +6 -0
  116. package/docs/play-store/STORE-LISTING.md +7 -0
  117. package/docs/play-store/SUBMISSION-CHECKLIST.md +5 -0
  118. package/docs/production-readiness.md +1 -1
  119. package/docs/project-audit/2026-05-16/00-FINALIZATION-PLAN.md +123 -0
  120. package/docs/project-audit/2026-05-16/01-BATCH-PLAN.md +227 -0
  121. package/docs/project-audit/2026-05-16/02-AUDIT-FINDINGS.md +144 -0
  122. package/docs/project-audit/2026-05-16/sessions/batch-01.md +42 -0
  123. package/docs/project-audit/2026-05-16/sessions/batch-02.md +74 -0
  124. package/docs/project-audit/2026-05-16/sessions/batch-03.md +71 -0
  125. package/docs/project-audit/2026-05-16/sessions/batch-04.md +88 -0
  126. package/docs/project-audit/2026-05-16/sessions/batch-05.md +63 -0
  127. package/docs/project-audit/2026-05-16/sessions/batch-06.md +103 -0
  128. package/docs/project-audit/2026-05-16/sessions/batch-07.md +61 -0
  129. package/docs/project-audit/2026-05-16/sessions/batch-08.md +101 -0
  130. package/docs/project-audit/2026-05-16/sessions/batch-09.md +105 -0
  131. package/docs/project-audit/2026-05-16/sessions/batch-10.md +102 -0
  132. package/docs/project-audit/AUDIT-HISTORY.md +74 -0
  133. package/docs/project-audit/BATCH-PLAN.md +168 -0
  134. package/docs/project-audit/MARKETING-WEBSITE-FINDINGS-2026-05-11.md +73 -0
  135. package/docs/project-audit/PRODUCTION-READINESS-AUDIT-2026-05-08.md +275 -0
  136. package/docs/project-finalization/00-tracker.json +60 -0
  137. package/docs/project-knowledge-base/01-system-overview.md +227 -0
  138. package/docs/project-knowledge-base/02-routes-pages-forms-users.md +352 -0
  139. package/docs/project-knowledge-base/03-tech-stack-modules-services.md +379 -0
  140. package/docs/project-knowledge-base/04-data-models-integrations.md +244 -0
  141. package/docs/project-knowledge-base/05-docs-corpus-inventory.md +256 -0
  142. package/docs/project-knowledge-base/06-operations-testing-legal-content.md +208 -0
  143. package/docs/project-knowledge-base/README.md +103 -0
  144. package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-05-19.md +81 -0
  145. package/docs/rules-tracker.md +102 -0
  146. package/docs/security/PRE-LAUNCH-PENTEST-CHECKLIST.md +116 -0
  147. package/docs/seo-aeo-rules.json +3043 -0
  148. package/docs/social-media-marketing/README.md +81 -0
  149. package/docs/social-media-marketing/posts-batch-01.md +613 -0
  150. package/docs/social-media-marketing/posts-batch-02.md +528 -0
  151. package/docs/social-media-marketing/whatsapp-messages-batch-01.md +458 -0
  152. package/docs/social-media-marketing/whatsapp-status-batch-01.md +355 -0
  153. package/docs/tracking/finalization-2026-05-16-tracker.json +346 -0
  154. package/docs/tracking/full-audit-tracker.json +121 -0
  155. package/docs/tracking/production-readiness-audit-tracker.json +429 -0
  156. package/docs/tracking/seo-checklist-tracker.json +333 -0
  157. package/ios/Plugin/BackgroundUpdate/BackgroundUpdatePlugin.swift +66 -9
  158. package/ios/Plugin/LiveUpdate/LiveUpdatePlugin.swift +306 -52
  159. package/ios/Plugin/NativeUpdatePlugin.swift +22 -9
  160. package/ios/Plugin/Security/SecurityManager.swift +13 -14
  161. package/package.json +37 -38
  162. package/cli/node_modules/.yarn-integrity +0 -16
  163. package/cli/node_modules/commander/LICENSE +0 -22
  164. package/cli/node_modules/commander/Readme.md +0 -1148
  165. package/cli/node_modules/commander/esm.mjs +0 -16
  166. package/cli/node_modules/commander/index.js +0 -26
  167. package/cli/node_modules/commander/lib/argument.js +0 -145
  168. package/cli/node_modules/commander/lib/command.js +0 -2179
  169. package/cli/node_modules/commander/lib/error.js +0 -43
  170. package/cli/node_modules/commander/lib/help.js +0 -462
  171. package/cli/node_modules/commander/lib/option.js +0 -329
  172. package/cli/node_modules/commander/lib/suggestSimilar.js +0 -100
  173. package/cli/node_modules/commander/package-support.json +0 -16
  174. package/cli/node_modules/commander/package.json +0 -80
  175. package/cli/node_modules/commander/typings/esm.d.mts +0 -3
  176. package/cli/node_modules/commander/typings/index.d.ts +0 -884
  177. package/cli/yarn.lock +0 -8
  178. package/dist/esm/__tests__/bundle-manager.test.d.ts +0 -1
  179. package/dist/esm/__tests__/bundle-manager.test.js +0 -151
  180. package/dist/esm/__tests__/bundle-manager.test.js.map +0 -1
  181. package/dist/esm/__tests__/config.test.d.ts +0 -1
  182. package/dist/esm/__tests__/config.test.js +0 -70
  183. package/dist/esm/__tests__/config.test.js.map +0 -1
  184. package/dist/esm/__tests__/delta-processor.test.d.ts +0 -1
  185. package/dist/esm/__tests__/delta-processor.test.js +0 -77
  186. package/dist/esm/__tests__/delta-processor.test.js.map +0 -1
  187. package/dist/esm/__tests__/firestore-schema.test.d.ts +0 -1
  188. package/dist/esm/__tests__/firestore-schema.test.js +0 -74
  189. package/dist/esm/__tests__/firestore-schema.test.js.map +0 -1
  190. package/dist/esm/__tests__/integration.test.d.ts +0 -1
  191. package/dist/esm/__tests__/integration.test.js +0 -78
  192. package/dist/esm/__tests__/integration.test.js.map +0 -1
  193. package/dist/esm/__tests__/manifest-reader.test.d.ts +0 -1
  194. package/dist/esm/__tests__/manifest-reader.test.js +0 -271
  195. package/dist/esm/__tests__/manifest-reader.test.js.map +0 -1
  196. package/dist/esm/__tests__/rollout-checker.test.d.ts +0 -1
  197. package/dist/esm/__tests__/rollout-checker.test.js +0 -210
  198. package/dist/esm/__tests__/rollout-checker.test.js.map +0 -1
  199. package/dist/esm/__tests__/security.test.d.ts +0 -1
  200. package/dist/esm/__tests__/security.test.js +0 -54
  201. package/dist/esm/__tests__/security.test.js.map +0 -1
  202. package/dist/esm/__tests__/version-manager.test.d.ts +0 -1
  203. package/dist/esm/__tests__/version-manager.test.js +0 -45
  204. package/dist/esm/__tests__/version-manager.test.js.map +0 -1
  205. package/dist/esm/app-review/app-review-manager.js.map +0 -1
  206. package/dist/esm/app-review/index.js.map +0 -1
  207. package/dist/esm/app-review/platform-review-handler.js.map +0 -1
  208. package/dist/esm/app-review/review-conditions-checker.js.map +0 -1
  209. package/dist/esm/app-review/review-rate-limiter.js.map +0 -1
  210. package/dist/esm/app-review/types.js.map +0 -1
  211. package/dist/esm/app-update/app-update-checker.js.map +0 -1
  212. package/dist/esm/app-update/app-update-installer.js.map +0 -1
  213. package/dist/esm/app-update/app-update-manager.js.map +0 -1
  214. package/dist/esm/app-update/app-update-notifier.js.map +0 -1
  215. package/dist/esm/app-update/index.js.map +0 -1
  216. package/dist/esm/app-update/platform-app-update.js.map +0 -1
  217. package/dist/esm/app-update/types.js.map +0 -1
  218. package/dist/esm/background-update/background-scheduler.js.map +0 -1
  219. package/dist/esm/background-update/index.js.map +0 -1
  220. package/dist/esm/background-update/notification-manager.js.map +0 -1
  221. package/dist/esm/config/support.js.map +0 -1
  222. package/dist/esm/core/analytics.js.map +0 -1
  223. package/dist/esm/core/cache-manager.js.map +0 -1
  224. package/dist/esm/core/config.js.map +0 -1
  225. package/dist/esm/core/errors.js.map +0 -1
  226. package/dist/esm/core/event-emitter.js.map +0 -1
  227. package/dist/esm/core/logger.js.map +0 -1
  228. package/dist/esm/core/performance.js.map +0 -1
  229. package/dist/esm/core/plugin-manager.js.map +0 -1
  230. package/dist/esm/core/security.js.map +0 -1
  231. package/dist/esm/definitions.js.map +0 -1
  232. package/dist/esm/firestore/firestore-client.d.ts +0 -109
  233. package/dist/esm/firestore/firestore-client.js +0 -264
  234. package/dist/esm/firestore/firestore-client.js.map +0 -1
  235. package/dist/esm/firestore/index.d.ts +0 -11
  236. package/dist/esm/firestore/index.js +0 -11
  237. package/dist/esm/firestore/index.js.map +0 -1
  238. package/dist/esm/firestore/manifest-reader.d.ts +0 -87
  239. package/dist/esm/firestore/manifest-reader.js +0 -294
  240. package/dist/esm/firestore/manifest-reader.js.map +0 -1
  241. package/dist/esm/firestore/schema.d.ts +0 -507
  242. package/dist/esm/firestore/schema.js +0 -73
  243. package/dist/esm/firestore/schema.js.map +0 -1
  244. package/dist/esm/index.js.map +0 -1
  245. package/dist/esm/live-update/bundle-manager.js.map +0 -1
  246. package/dist/esm/live-update/certificate-pinning.js.map +0 -1
  247. package/dist/esm/live-update/delta-processor.js.map +0 -1
  248. package/dist/esm/live-update/download-manager.js.map +0 -1
  249. package/dist/esm/live-update/rollout-checker.js.map +0 -1
  250. package/dist/esm/live-update/update-manager.js.map +0 -1
  251. package/dist/esm/live-update/version-manager.js.map +0 -1
  252. package/dist/esm/plugin.js.map +0 -1
  253. package/dist/esm/security/crypto.js.map +0 -1
  254. package/dist/esm/security/validator.js.map +0 -1
  255. package/dist/esm/web.js.map +0 -1
  256. package/dist/plugin.cjs.js.map +0 -1
  257. package/dist/plugin.esm.js.map +0 -1
  258. package/dist/plugin.js.map +0 -1
  259. package/docs/FIREBASE_INTEGRATION_TRACKER.md +0 -321
  260. package/docs/FIREBASE_QUERIES_AND_INDEXES_AUDIT.md +0 -221
  261. package/docs/examples/firebase-backend-example.md +0 -27
  262. package/docs/guides/no-cost-backend-implementation-plan.md +0 -77
  263. package/docs/guides/no-cost-firestore-google-drive-backend.md +0 -60
  264. package/docs/play-console-rejection-rules.json +0 -428
  265. /package/docs/{MARKETING_WEBSITE_PLAN.md → archive/MARKETING_WEBSITE_PLAN.md} +0 -0
@@ -0,0 +1,333 @@
1
+ {
2
+ "project": "native-update",
3
+ "projectUrl": "https://nativeupdate.aoneahsan.com",
4
+ "projectDescription": "Capacitor plugin for OTA updates, app store updates & in-app reviews",
5
+ "createdAt": "2026-04-10",
6
+ "lastUpdated": "2026-04-10",
7
+ "summary": {
8
+ "totalItems": 47,
9
+ "completed": 14,
10
+ "inProgress": 0,
11
+ "pending": 22,
12
+ "notApplicable": 0,
13
+ "requiresDeployment": 11
14
+ },
15
+ "phases": {
16
+ "phase1_technical_foundation": {
17
+ "name": "Phase 1: Technical Foundation",
18
+ "description": "Core technical SEO setup that must be done first",
19
+ "items": [
20
+ {
21
+ "id": "P1-01",
22
+ "task": "Google Search Console - Add property, verify via HTML meta tag or DNS TXT, submit sitemap.xml",
23
+ "status": "requires_deployment",
24
+ "notes": "Must deploy first, then verify at search.google.com/search-console",
25
+ "implementedAt": null
26
+ },
27
+ {
28
+ "id": "P1-02",
29
+ "task": "Bing Webmaster Tools - Add site, verify via meta tag, submit sitemap.xml, import from GSC",
30
+ "status": "requires_deployment",
31
+ "notes": "bing.com/webmasters - has auto-import from Google Search Console",
32
+ "implementedAt": null
33
+ },
34
+ {
35
+ "id": "P1-03",
36
+ "task": "Yandex Webmaster - Add site, verify via meta tag, submit sitemap.xml",
37
+ "status": "requires_deployment",
38
+ "notes": "webmaster.yandex.com",
39
+ "implementedAt": null
40
+ },
41
+ {
42
+ "id": "P1-04",
43
+ "task": "Sitemap.xml - Ensure valid sitemap exists at /sitemap.xml with all public pages",
44
+ "status": "completed",
45
+ "notes": "Cleaned up: removed internal docs (reports, trackers, plans), login/signup. Now 62 clean public URLs.",
46
+ "implementedAt": "2026-04-10"
47
+ },
48
+ {
49
+ "id": "P1-05",
50
+ "task": "robots.txt - Ensure it exists and points to sitemap with correct project URL",
51
+ "status": "completed",
52
+ "notes": "Already exists with AI crawler allowlisting and correct sitemap URL",
53
+ "implementedAt": "2026-03-27"
54
+ },
55
+ {
56
+ "id": "P1-06",
57
+ "task": "SSL Certificate - All pages must be HTTPS",
58
+ "status": "completed",
59
+ "notes": "Already served via HTTPS on nativeupdate.aoneahsan.com",
60
+ "implementedAt": "2025-12-27"
61
+ },
62
+ {
63
+ "id": "P1-07",
64
+ "task": "Mobile Responsive - Test at search.google.com/test/mobile-friendly",
65
+ "status": "requires_deployment",
66
+ "notes": "Deploy then test. Site uses Tailwind CSS with responsive design.",
67
+ "implementedAt": null
68
+ },
69
+ {
70
+ "id": "P1-08",
71
+ "task": "Page Speed - Test at pagespeed.web.dev, aim for 90+ mobile",
72
+ "status": "requires_deployment",
73
+ "notes": "Deploy then test. Optimize based on results.",
74
+ "implementedAt": null
75
+ },
76
+ {
77
+ "id": "P1-09",
78
+ "task": "Core Web Vitals - Check in GSC after a few weeks. LCP < 2.5s, FID < 100ms, CLS < 0.1",
79
+ "status": "requires_deployment",
80
+ "notes": "Needs GSC data accumulation over weeks",
81
+ "implementedAt": null
82
+ }
83
+ ]
84
+ },
85
+ "phase2_on_page_seo": {
86
+ "name": "Phase 2: On-Page SEO",
87
+ "description": "Per-page SEO optimization for every public page",
88
+ "items": [
89
+ {
90
+ "id": "P2-01",
91
+ "task": "Title Tags - Every page needs unique <title> under 60 chars",
92
+ "status": "completed",
93
+ "notes": "usePageSEO hook applied to all 14 public pages with unique titles",
94
+ "implementedAt": "2026-04-10"
95
+ },
96
+ {
97
+ "id": "P2-02",
98
+ "task": "Meta Descriptions - Every page needs unique <meta description> under 155 chars",
99
+ "status": "completed",
100
+ "notes": "usePageSEO hook sets per-page descriptions on all 14 public pages",
101
+ "implementedAt": "2026-04-10"
102
+ },
103
+ {
104
+ "id": "P2-03",
105
+ "task": "H1 Tags - One H1 per page matching the page topic",
106
+ "status": "completed",
107
+ "notes": "Verified: all pages have exactly one H1 tag. Hidden SEO div also has H1 for crawlers.",
108
+ "implementedAt": "2026-04-10"
109
+ },
110
+ {
111
+ "id": "P2-04",
112
+ "task": "H2/H3 Structure - Logical heading hierarchy on every page",
113
+ "status": "completed",
114
+ "notes": "Pages use proper H1->H2->H3 hierarchy. Hidden SEO div has structured headings.",
115
+ "implementedAt": "2026-04-10"
116
+ },
117
+ {
118
+ "id": "P2-05",
119
+ "task": "Image Alt Text - Every image needs descriptive alt text",
120
+ "status": "pending",
121
+ "notes": "Need to audit all img/svg elements across pages for alt text",
122
+ "implementedAt": null
123
+ },
124
+ {
125
+ "id": "P2-06",
126
+ "task": "Internal Linking - Cross-link related pages (features->docs, pricing->features, etc.)",
127
+ "status": "pending",
128
+ "notes": "Pages have some CTAs but need more cross-linking for SEO juice",
129
+ "implementedAt": null
130
+ },
131
+ {
132
+ "id": "P2-07",
133
+ "task": "Canonical URLs - Add <link rel=canonical> per page to prevent duplicates",
134
+ "status": "completed",
135
+ "notes": "usePageSEO hook sets per-page canonical URL on every page dynamically",
136
+ "implementedAt": "2026-04-10"
137
+ },
138
+ {
139
+ "id": "P2-08",
140
+ "task": "Structured Data / Schema Markup - JSON-LD per page type (WebApplication, FAQPage, Article, BreadcrumbList)",
141
+ "status": "completed",
142
+ "notes": "BreadcrumbList auto-generated per page via usePageSEO. SoftwareApplication, FAQPage (10 Q&A), WebSite, Organization in postbuild.",
143
+ "implementedAt": "2026-04-10"
144
+ },
145
+ {
146
+ "id": "P2-09",
147
+ "task": "Open Graph tags - Per-page og:title, og:description, og:url, og:image",
148
+ "status": "completed",
149
+ "notes": "usePageSEO hook sets per-page OG tags on all pages",
150
+ "implementedAt": "2026-04-10"
151
+ },
152
+ {
153
+ "id": "P2-10",
154
+ "task": "Twitter Card tags - Per-page twitter:title, twitter:description",
155
+ "status": "completed",
156
+ "notes": "usePageSEO hook sets per-page Twitter Card tags on all pages",
157
+ "implementedAt": "2026-04-10"
158
+ }
159
+ ]
160
+ },
161
+ "phase3_content_seo": {
162
+ "name": "Phase 3: Content SEO",
163
+ "description": "Content strategy for long-tail keywords and organic traffic",
164
+ "items": [
165
+ {
166
+ "id": "P3-01",
167
+ "task": "Blog section - Create blog route and infrastructure for SEO content",
168
+ "status": "pending",
169
+ "notes": "No blog exists yet. Need /blog route with markdown-based posts.",
170
+ "implementedAt": null
171
+ },
172
+ {
173
+ "id": "P3-02",
174
+ "task": "Blog Posts - Write 5-10 initial posts targeting long-tail keywords",
175
+ "status": "pending",
176
+ "notes": "Topics: 'how to deploy OTA updates capacitor', 'capacitor vs codepush', 'mobile app update strategies', etc.",
177
+ "implementedAt": null
178
+ },
179
+ {
180
+ "id": "P3-03",
181
+ "task": "Keyword Research - Identify target keywords using free tools",
182
+ "status": "pending",
183
+ "notes": "Google Keyword Planner, Ubersuggest, AnswerThePublic, Google Autocomplete",
184
+ "implementedAt": null
185
+ },
186
+ {
187
+ "id": "P3-04",
188
+ "task": "FAQ Sections - Add visible FAQ with schema on key pages (home, features, pricing, docs)",
189
+ "status": "pending",
190
+ "notes": "FAQ schema exists in postbuild (expanded to 10 Q&A) but no visible FAQ sections on pages yet",
191
+ "implementedAt": null
192
+ },
193
+ {
194
+ "id": "P3-05",
195
+ "task": "Long-form feature descriptions - 300-500 words of unique content per feature page",
196
+ "status": "pending",
197
+ "notes": "Features page exists but may need more descriptive content per feature",
198
+ "implementedAt": null
199
+ }
200
+ ]
201
+ },
202
+ "phase4_niche_seo": {
203
+ "name": "Phase 4: Niche & Competitive SEO",
204
+ "description": "Niche-specific and competitive positioning content",
205
+ "items": [
206
+ {
207
+ "id": "P4-01",
208
+ "task": "Capacitor-specific keywords - Target 'capacitor ota updates', 'capacitor live updates plugin', 'capacitor code push alternative'",
209
+ "status": "pending",
210
+ "notes": "These are the primary niche keywords for this product",
211
+ "implementedAt": null
212
+ },
213
+ {
214
+ "id": "P4-02",
215
+ "task": "Comparison blog posts - 'Native Update vs CodePush', 'Native Update vs Capgo', 'Best Capacitor OTA plugins 2026'",
216
+ "status": "pending",
217
+ "notes": "Create honest comparison content highlighting strengths",
218
+ "implementedAt": null
219
+ },
220
+ {
221
+ "id": "P4-03",
222
+ "task": "Feature-specific landing content - Each feature (OTA, app updates, reviews) should have rich descriptive content",
223
+ "status": "pending",
224
+ "notes": "Dedicated feature pages exist in /docs/features/ but marketing pages need richer content",
225
+ "implementedAt": null
226
+ }
227
+ ]
228
+ },
229
+ "phase5_monitoring": {
230
+ "name": "Phase 5: Monitoring & Iteration",
231
+ "description": "Ongoing monitoring and optimization",
232
+ "items": [
233
+ {
234
+ "id": "P5-01",
235
+ "task": "Google Search Console - Weekly check: queries, indexed pages, errors",
236
+ "status": "requires_deployment",
237
+ "notes": "Requires GSC setup first (P1-01)",
238
+ "implementedAt": null
239
+ },
240
+ {
241
+ "id": "P5-02",
242
+ "task": "Track Rankings - Use free tier Ubersuggest/SERPRobot for 10-20 priority keywords",
243
+ "status": "pending",
244
+ "notes": "Set up after deployment and GSC verification",
245
+ "implementedAt": null
246
+ },
247
+ {
248
+ "id": "P5-03",
249
+ "task": "Fix Crawl Errors - Check GSC Coverage and fix any errors",
250
+ "status": "requires_deployment",
251
+ "notes": "Requires GSC data",
252
+ "implementedAt": null
253
+ },
254
+ {
255
+ "id": "P5-04",
256
+ "task": "Update Content - Refresh content every 3-6 months",
257
+ "status": "pending",
258
+ "notes": "Set reminder for quarterly content refresh",
259
+ "implementedAt": null
260
+ }
261
+ ]
262
+ },
263
+ "aeo_aio_optimization": {
264
+ "name": "AEO & AIO Optimization",
265
+ "description": "Answer Engine Optimization and AI Optimization for ChatGPT, Claude, Perplexity visibility",
266
+ "items": [
267
+ {
268
+ "id": "AI-01",
269
+ "task": "FAQ Schema - Add FAQPage JSON-LD to main pages and blog posts",
270
+ "status": "completed",
271
+ "notes": "Expanded to 10 Q&A pairs in postbuild-seo.ts covering installation, CodePush comparison, rollback, staged rollouts, security, platform support.",
272
+ "implementedAt": "2026-04-10"
273
+ },
274
+ {
275
+ "id": "AI-02",
276
+ "task": "Answer-First Content - Start descriptions with direct, concise answers in first paragraph",
277
+ "status": "pending",
278
+ "notes": "Review all page content for answer-first structure",
279
+ "implementedAt": null
280
+ },
281
+ {
282
+ "id": "AI-03",
283
+ "task": "How-to Guides - Step-by-step guides for common tasks",
284
+ "status": "pending",
285
+ "notes": "Docs have some guides. Need blog posts with 'How to' format.",
286
+ "implementedAt": null
287
+ },
288
+ {
289
+ "id": "AI-04",
290
+ "task": "Definition-Style Openings - Clear definitions at start of key pages",
291
+ "status": "pending",
292
+ "notes": "'Native Update is a Capacitor plugin that...' pattern on all key pages",
293
+ "implementedAt": null
294
+ },
295
+ {
296
+ "id": "AI-05",
297
+ "task": "Comparison Content - 'Native Update vs X' style content",
298
+ "status": "pending",
299
+ "notes": "Same as P4-02, cross-referenced",
300
+ "implementedAt": null
301
+ },
302
+ {
303
+ "id": "AI-06",
304
+ "task": "Structured Data Everywhere - Maximum schema markup coverage",
305
+ "status": "completed",
306
+ "notes": "WebSite, Organization, SoftwareApplication, FAQPage in postbuild. BreadcrumbList per-page via usePageSEO hook.",
307
+ "implementedAt": "2026-04-10"
308
+ },
309
+ {
310
+ "id": "AI-07",
311
+ "task": "Clear Product Description - 2-3 sentence quotable description for AI systems",
312
+ "status": "completed",
313
+ "notes": "Updated index.html hidden content with detailed, specific, quotable description including feature names and specifics.",
314
+ "implementedAt": "2026-04-10"
315
+ },
316
+ {
317
+ "id": "AI-08",
318
+ "task": "Be Specific - Use exact numbers and specifics instead of vague claims",
319
+ "status": "completed",
320
+ "notes": "Updated descriptions to include '3 core features', specific feature names, framework list, installation commands.",
321
+ "implementedAt": "2026-04-10"
322
+ },
323
+ {
324
+ "id": "AI-09",
325
+ "task": "AI Crawler Access in robots.txt - Allow GPTBot, ClaudeBot, PerplexityBot etc.",
326
+ "status": "completed",
327
+ "notes": "Already implemented in robots.txt with full AI crawler allowlisting",
328
+ "implementedAt": "2026-03-27"
329
+ }
330
+ ]
331
+ }
332
+ }
333
+ }
@@ -3,9 +3,23 @@ import Capacitor
3
3
  import BackgroundTasks
4
4
  import UserNotifications
5
5
 
6
+ /// BackgroundUpdatePlugin schedules silent OTA update checks via
7
+ /// `BGAppRefreshTask` on iOS 13+. The host app **must** declare the
8
+ /// scheduler identifier in its own `Info.plist` — the framework's plist
9
+ /// declaration does not propagate into the app bundle. Add:
10
+ ///
11
+ /// <key>BGTaskSchedulerPermittedIdentifiers</key>
12
+ /// <array>
13
+ /// <string>com.aoneahsan.nativeupdate.background</string>
14
+ /// </array>
15
+ ///
16
+ /// and (for the Capabilities pane) ensure `background-app-refresh` is
17
+ /// listed under `UIBackgroundModes`. Without those entries iOS will
18
+ /// silently refuse to register the task and background updates never
19
+ /// run — there is no runtime error.
6
20
  @objc(BackgroundUpdatePlugin)
7
21
  public class BackgroundUpdatePlugin: CAPPlugin {
8
-
22
+
9
23
  private let backgroundTaskIdentifier = "com.aoneahsan.nativeupdate.background"
10
24
  private var backgroundUpdateConfig: BackgroundUpdateConfig?
11
25
  private var backgroundUpdateStatus = BackgroundUpdateStatus(
@@ -25,7 +39,13 @@ public class BackgroundUpdatePlugin: CAPPlugin {
25
39
  // Register background task
26
40
  if #available(iOS 13.0, *) {
27
41
  BGTaskScheduler.shared.register(forTaskWithIdentifier: backgroundTaskIdentifier, using: nil) { task in
28
- self.handleBackgroundTask(task: task as! BGAppRefreshTask)
42
+ guard let refreshTask = task as? BGAppRefreshTask else {
43
+ // Force-casting here would crash the host app process
44
+ // if Apple ever delivers a different concrete type.
45
+ task.setTaskCompleted(success: false)
46
+ return
47
+ }
48
+ self.handleBackgroundTask(task: refreshTask)
29
49
  }
30
50
  }
31
51
  }
@@ -121,31 +141,68 @@ public class BackgroundUpdatePlugin: CAPPlugin {
121
141
 
122
142
  // MARK: - Private Methods
123
143
 
124
- private func disableBackgroundUpdates() {
144
+ /// Plain Swift call — used by `NativeUpdatePlugin.cleanup()` so it
145
+ /// doesn't have to manufacture a `CAPPluginCall` (the relevant
146
+ /// initializer is internal in the public Capacitor SDK).
147
+ func disableBackgroundUpdatesInternal() {
125
148
  backgroundUpdateStatus.enabled = false
126
149
  backgroundUpdateStatus.isRunning = false
127
150
  backgroundUpdateStatus.currentTaskId = nil
128
-
151
+
129
152
  if #available(iOS 13.0, *) {
130
153
  BGTaskScheduler.shared.cancel(taskRequestWithIdentifier: backgroundTaskIdentifier)
131
154
  }
132
155
  }
156
+
157
+ private func disableBackgroundUpdates() {
158
+ disableBackgroundUpdatesInternal()
159
+ }
133
160
 
134
161
  private func scheduleBackgroundTask(interval: Int) {
135
162
  guard #available(iOS 13.0, *) else {
136
- NSLog("BackgroundTasks framework not available on iOS < 13.0")
163
+ NSLog("[native-update] BackgroundTasks framework not available on iOS < 13.0")
137
164
  return
138
165
  }
139
-
166
+
167
+ // Cancel any prior pending request with this identifier before
168
+ // submitting a new one. iOS documents submit() as replacing an
169
+ // existing request of the same identifier, but a few OS versions
170
+ // have been observed to fail the second submit with an
171
+ // already-scheduled error instead of replacing. Explicit cancel
172
+ // is the reliable path.
173
+ BGTaskScheduler.shared.cancel(taskRequestWithIdentifier: backgroundTaskIdentifier)
174
+
140
175
  let request = BGAppRefreshTaskRequest(identifier: backgroundTaskIdentifier)
141
176
  request.earliestBeginDate = Date(timeIntervalSinceNow: TimeInterval(interval / 1000))
142
-
177
+
143
178
  do {
144
179
  try BGTaskScheduler.shared.submit(request)
145
180
  backgroundUpdateStatus.nextCheckTime = Int(Date().timeIntervalSince1970 * 1000) + interval
146
- NSLog("Background task scheduled for \(interval)ms from now")
181
+ NSLog("[native-update] Background task scheduled for \(interval)ms from now")
182
+ } catch let error as BGTaskScheduler.Error {
183
+ // Surface a specific diagnostic. .notPermitted almost always
184
+ // means the host app's Info.plist is missing the scheduler
185
+ // identifier — which is a silent failure mode otherwise.
186
+ switch error.code {
187
+ case .notPermitted:
188
+ NSLog("[native-update] BGTaskScheduler .notPermitted — host app is missing BGTaskSchedulerPermittedIdentifiers entry for \(backgroundTaskIdentifier) in Info.plist")
189
+ case .tooManyPendingTaskRequests:
190
+ NSLog("[native-update] BGTaskScheduler .tooManyPendingTaskRequests — another task is already queued; background updates will run on the existing schedule")
191
+ case .unavailable:
192
+ NSLog("[native-update] BGTaskScheduler .unavailable — background tasks are disabled on this device (likely simulator or Low Power Mode)")
193
+ @unknown default:
194
+ NSLog("[native-update] Failed to schedule background task: \(error.localizedDescription)")
195
+ }
196
+ backgroundUpdateStatus.lastError = UpdateError(
197
+ code: "BGTASK_SUBMIT_FAILED",
198
+ message: error.localizedDescription
199
+ )
147
200
  } catch {
148
- NSLog("Failed to schedule background task: \(error.localizedDescription)")
201
+ NSLog("[native-update] Failed to schedule background task: \(error.localizedDescription)")
202
+ backgroundUpdateStatus.lastError = UpdateError(
203
+ code: "BGTASK_SUBMIT_FAILED",
204
+ message: error.localizedDescription
205
+ )
149
206
  }
150
207
  }
151
208