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.
- 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/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 +73 -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,201 +0,0 @@
|
|
|
1
|
-
# Testing Requirements
|
|
2
|
-
|
|
3
|
-
This document outlines the testing requirements for the native-update plugin.
|
|
4
|
-
|
|
5
|
-
## Current Testing Status
|
|
6
|
-
|
|
7
|
-
- **Plugin testing**: Handled in actual/live applications using the plugin
|
|
8
|
-
- **Example apps**: Demonstrate functionality for manual testing
|
|
9
|
-
- **iOS Native Tests (XCTest)**: ✅ Implemented in `/ios/Tests/NativeUpdateTests/`
|
|
10
|
-
- **Android Native Tests (JUnit/Kotlin)**: ✅ Implemented in `/android/src/test/`
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## iOS Native Tests (XCTest)
|
|
15
|
-
|
|
16
|
-
### Test File Structure
|
|
17
|
-
```
|
|
18
|
-
ios/
|
|
19
|
-
└── Tests/
|
|
20
|
-
└── NativeUpdateTests/
|
|
21
|
-
├── LiveUpdateTests.swift
|
|
22
|
-
├── AppUpdateTests.swift
|
|
23
|
-
├── AppReviewTests.swift
|
|
24
|
-
├── BundleManagerTests.swift
|
|
25
|
-
└── SecurityTests.swift
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### Test Categories
|
|
29
|
-
|
|
30
|
-
#### LiveUpdateTests.swift
|
|
31
|
-
- `testCheckForUpdate()` - Verify update check returns correct response
|
|
32
|
-
- `testDownloadBundle()` - Verify bundle download with progress
|
|
33
|
-
- `testApplyUpdate()` - Verify bundle extraction and application
|
|
34
|
-
- `testRollback()` - Verify rollback to previous version
|
|
35
|
-
- `testChecksumVerification()` - Verify SHA-256 checksum validation
|
|
36
|
-
- `testSignatureVerification()` - Verify RSA/ECDSA signature validation
|
|
37
|
-
- `testChannelManagement()` - Verify channel switching (production/staging/dev)
|
|
38
|
-
|
|
39
|
-
#### AppUpdateTests.swift
|
|
40
|
-
- `testCheckAppStoreVersion()` - Verify app store version check
|
|
41
|
-
- `testVersionComparison()` - Verify semantic version comparison
|
|
42
|
-
- `testUpdateAvailability()` - Verify update availability detection
|
|
43
|
-
- `testOpenAppStore()` - Verify App Store navigation
|
|
44
|
-
|
|
45
|
-
#### AppReviewTests.swift
|
|
46
|
-
- `testRequestReview()` - Verify StoreKit review request
|
|
47
|
-
- `testRateLimiting()` - Verify review request rate limiting
|
|
48
|
-
|
|
49
|
-
#### BundleManagerTests.swift
|
|
50
|
-
- `testBundleStorage()` - Verify bundle storage in app sandbox
|
|
51
|
-
- `testBundleCleanup()` - Verify old bundle cleanup
|
|
52
|
-
- `testActiveBundlePath()` - Verify active bundle path resolution
|
|
53
|
-
|
|
54
|
-
#### SecurityTests.swift
|
|
55
|
-
- `testInputValidation()` - Verify URL/input sanitization
|
|
56
|
-
- `testHTTPSEnforcement()` - Verify HTTPS-only connections
|
|
57
|
-
- `testDowngradeProtection()` - Verify version downgrade prevention
|
|
58
|
-
- `testKeychain Storage()` - Verify sensitive data in Keychain
|
|
59
|
-
|
|
60
|
-
### Running iOS Tests
|
|
61
|
-
```bash
|
|
62
|
-
cd ios
|
|
63
|
-
xcodebuild test -scheme NativeUpdate -destination 'platform=iOS Simulator,name=iPhone 15'
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Current Test Files (✅ Implemented)
|
|
67
|
-
|
|
68
|
-
| File | Tests | Status |
|
|
69
|
-
|------|-------|--------|
|
|
70
|
-
| `SecurityManagerTests.swift` | 6 tests | ✅ |
|
|
71
|
-
| `LiveUpdateTests.swift` | 10 tests | ✅ |
|
|
72
|
-
| `AppUpdateTests.swift` | 5 tests | ✅ |
|
|
73
|
-
| `AppReviewTests.swift` | 5 tests | ✅ |
|
|
74
|
-
| `BackgroundUpdateTests.swift` | 6 tests | ✅ |
|
|
75
|
-
| **Total** | **32 tests** | ✅ |
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## Android Native Tests (JUnit)
|
|
80
|
-
|
|
81
|
-
### Test File Structure
|
|
82
|
-
```
|
|
83
|
-
android/
|
|
84
|
-
└── src/
|
|
85
|
-
└── test/
|
|
86
|
-
└── java/
|
|
87
|
-
└── com/
|
|
88
|
-
└── aoneahsan/
|
|
89
|
-
└── nativeupdate/
|
|
90
|
-
├── LiveUpdateTest.kt
|
|
91
|
-
├── AppUpdateTest.kt
|
|
92
|
-
├── AppReviewTest.kt
|
|
93
|
-
├── BundleManagerTest.kt
|
|
94
|
-
└── SecurityTest.kt
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Test Categories
|
|
98
|
-
|
|
99
|
-
#### LiveUpdateTest.kt
|
|
100
|
-
- `testCheckForUpdate()` - Verify update check HTTP request
|
|
101
|
-
- `testDownloadBundle()` - Verify bundle download with OkHttp
|
|
102
|
-
- `testApplyUpdate()` - Verify bundle extraction to internal storage
|
|
103
|
-
- `testRollback()` - Verify rollback mechanism
|
|
104
|
-
- `testChecksumVerification()` - Verify SHA-256 validation
|
|
105
|
-
- `testSignatureVerification()` - Verify signature with Android Keystore
|
|
106
|
-
- `testChannelManagement()` - Verify channel configuration
|
|
107
|
-
|
|
108
|
-
#### AppUpdateTest.kt
|
|
109
|
-
- `testCheckPlayStoreVersion()` - Verify Play Core version check
|
|
110
|
-
- `testImmediateUpdate()` - Verify blocking update flow
|
|
111
|
-
- `testFlexibleUpdate()` - Verify background update flow
|
|
112
|
-
- `testUpdatePriority()` - Verify update priority handling
|
|
113
|
-
|
|
114
|
-
#### AppReviewTest.kt
|
|
115
|
-
- `testRequestReview()` - Verify Play Core review API
|
|
116
|
-
- `testReviewManagerInitialization()` - Verify ReviewManager setup
|
|
117
|
-
- `testRateLimiting()` - Verify request limiting
|
|
118
|
-
|
|
119
|
-
#### BundleManagerTest.kt
|
|
120
|
-
- `testBundleStorage()` - Verify internal storage operations
|
|
121
|
-
- `testBundleCleanup()` - Verify old bundle deletion
|
|
122
|
-
- `testActiveBundlePath()` - Verify bundle path resolution
|
|
123
|
-
- `testStoragePermissions()` - Verify no external storage access
|
|
124
|
-
|
|
125
|
-
#### SecurityTest.kt
|
|
126
|
-
- `testInputValidation()` - Verify input sanitization
|
|
127
|
-
- `testHTTPSEnforcement()` - Verify HTTPS-only policy
|
|
128
|
-
- `testDowngradeProtection()` - Verify version validation
|
|
129
|
-
- `testKeystore()` - Verify Android Keystore usage
|
|
130
|
-
|
|
131
|
-
### Running Android Tests
|
|
132
|
-
```bash
|
|
133
|
-
cd android
|
|
134
|
-
./gradlew test
|
|
135
|
-
./gradlew connectedAndroidTest # For instrumented tests
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Current Test Files (✅ Implemented)
|
|
139
|
-
|
|
140
|
-
| File | Tests | Status |
|
|
141
|
-
|------|-------|--------|
|
|
142
|
-
| `SecurityManagerTest.kt` | 10 tests | ✅ |
|
|
143
|
-
| `LiveUpdatePluginTest.kt` | 10 tests | ✅ |
|
|
144
|
-
| `AppUpdatePluginTest.kt` | 5 tests | ✅ |
|
|
145
|
-
| `AppReviewPluginTest.kt` | 5 tests | ✅ |
|
|
146
|
-
| `BackgroundUpdateWorkerTest.kt` | 5 tests | ✅ |
|
|
147
|
-
| `BackgroundNotificationManagerTest.kt` | 5 tests | ✅ |
|
|
148
|
-
| **Total** | **40 tests** | ✅ |
|
|
149
|
-
|
|
150
|
-
### Test Dependencies (Added to build.gradle)
|
|
151
|
-
|
|
152
|
-
```gradle
|
|
153
|
-
testImplementation 'junit:junit:4.13.2'
|
|
154
|
-
testImplementation 'org.mockito:mockito-core:5.8.0'
|
|
155
|
-
testImplementation 'org.mockito.kotlin:mockito-kotlin:5.2.1'
|
|
156
|
-
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3'
|
|
157
|
-
testImplementation 'com.google.truth:truth:1.1.5'
|
|
158
|
-
testImplementation 'org.robolectric:robolectric:4.11.1'
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
## Security Testing Checklist
|
|
164
|
-
|
|
165
|
-
- [ ] Test with malformed bundle files (corrupted ZIP)
|
|
166
|
-
- [ ] Test with invalid checksums
|
|
167
|
-
- [ ] Test with expired/invalid signatures
|
|
168
|
-
- [ ] Test with HTTP URLs (should be rejected)
|
|
169
|
-
- [ ] Test downgrade attempts (should be blocked)
|
|
170
|
-
- [ ] Test oversized bundles (should respect limits)
|
|
171
|
-
- [ ] Test with network interruptions
|
|
172
|
-
- [ ] Test permission denial scenarios
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
## Test Implementation Status
|
|
177
|
-
|
|
178
|
-
All test categories have been implemented as of 2026-01-16:
|
|
179
|
-
|
|
180
|
-
| Category | Location | Tests | Status |
|
|
181
|
-
|----------|----------|-------|--------|
|
|
182
|
-
| iOS Native Tests | `/ios/Tests/NativeUpdateTests/` | 5 test files, 32 tests | ✅ Complete |
|
|
183
|
-
| Android Native Tests | `/android/src/test/.../nativeupdate/` | 6 test files, 40 tests | ✅ Complete |
|
|
184
|
-
| **Total** | | **72 tests** | ✅ Complete |
|
|
185
|
-
|
|
186
|
-
## Running All Tests
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
# iOS Native Tests
|
|
190
|
-
cd ios && xcodebuild test -scheme NativeUpdate -destination 'platform=iOS Simulator,name=iPhone 15'
|
|
191
|
-
|
|
192
|
-
# Android Native Tests
|
|
193
|
-
cd android && ./gradlew test
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
## Additional Testing
|
|
197
|
-
|
|
198
|
-
Manual testing is also supported through:
|
|
199
|
-
- Example apps for end-user testing
|
|
200
|
-
- CLI command verification
|
|
201
|
-
- Integration testing in production apps
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Native Update — Project Profile
|
|
2
|
-
|
|
3
|
-
**Last Updated:** 2026-04-25
|
|
4
|
-
|
|
5
|
-
## What this is
|
|
6
|
-
|
|
7
|
-
Native Update is a Capacitor plugin that delivers three update flows for hybrid mobile apps in a single API surface:
|
|
8
|
-
|
|
9
|
-
1. **Live (OTA) updates** — push JavaScript/CSS/HTML bundles to a running app without going through the app store. Bundle is downloaded, verified by checksum + signature, applied on next launch.
|
|
10
|
-
2. **Native app updates** — prompt users to update through Google Play / Apple App Store when a new native binary is available. Uses platform-native dialogs (Play Core In-App Update on Android, App Store deep-link on iOS).
|
|
11
|
-
3. **In-app reviews** — request a Play Store / App Store review at the right moment using each platform's native review UI.
|
|
12
|
-
|
|
13
|
-
## Why this exists
|
|
14
|
-
|
|
15
|
-
Building Capacitor apps that ship updates quickly is hard. Apple and Google review processes take days. For non-native bundles (the JS/CSS that ships with most Capacitor apps), there's no reason to wait — the changes don't touch native code. Native Update lets developers ship hot fixes and small features in minutes via OTA, while still using the official app-store rails for native binary updates and review requests. The plugin exists to remove that friction without forcing developers to build their own bundle pipeline, signing flow, and rollback mechanism.
|
|
16
|
-
|
|
17
|
-
## Distribution
|
|
18
|
-
|
|
19
|
-
- **npm:** `native-update` (current version 2.0.0)
|
|
20
|
-
- **Source:** https://github.com/aoneahsan/native-update (MIT)
|
|
21
|
-
- **Marketing site + dashboard:** https://nativeupdate.aoneahsan.com
|
|
22
|
-
- **Docs:** Surfaced at the marketing site under `/docs/...` and in `/docs` of this repo
|
|
23
|
-
|
|
24
|
-
## Audience
|
|
25
|
-
|
|
26
|
-
Capacitor app developers and small-to-mid-size product teams who:
|
|
27
|
-
- Ship hybrid mobile apps (React/Vue/Angular + Capacitor)
|
|
28
|
-
- Need rapid iteration without app-store review delays for non-native fixes
|
|
29
|
-
- Want a self-hostable update server (Firestore / Node / Laravel templates included) to keep costs low and data sovereign
|
|
30
|
-
- Want native review prompts and store-update prompts working out of the box
|
|
31
|
-
|
|
32
|
-
## Core value props
|
|
33
|
-
|
|
34
|
-
- One package for three flows (OTA + native update + review)
|
|
35
|
-
- Multiple backend templates (Firestore, Node + Express, Laravel + Nova) — pick what fits your stack
|
|
36
|
-
- Channel-based rollouts (alpha, beta, production) with percentage rollout support
|
|
37
|
-
- Bundle integrity (SHA-256 checksum + signature verification)
|
|
38
|
-
- Background download + apply-on-restart for low-friction updates
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Native Update — Feature Inventory
|
|
2
|
-
|
|
3
|
-
**Last Updated:** 2026-04-25
|
|
4
|
-
|
|
5
|
-
## Live updates (OTA)
|
|
6
|
-
|
|
7
|
-
- Channel-based bundle delivery (`alpha`, `beta`, `production` by default; custom channels supported)
|
|
8
|
-
- Manifest-driven version pinning per channel
|
|
9
|
-
- SHA-256 checksum verification on every download
|
|
10
|
-
- RSA signature verification with developer-provided public key (optional but recommended)
|
|
11
|
-
- Background download with progress events
|
|
12
|
-
- Apply-on-restart strategy (no mid-session bundle swap)
|
|
13
|
-
- Rollback to last-known-good bundle on integrity failure
|
|
14
|
-
- Forced vs optional updates (manifest flag)
|
|
15
|
-
- Percentage rollouts (manifest field), client-side gated by stable hash of `installId`
|
|
16
|
-
- Minimum native version constraint (don't deliver a bundle that requires a newer native binary)
|
|
17
|
-
|
|
18
|
-
## Native app updates
|
|
19
|
-
|
|
20
|
-
- Android: Google Play Core In-App Update (immediate + flexible flows)
|
|
21
|
-
- iOS: App Store version check via app-store API + deep link to update
|
|
22
|
-
- Manifest-driven minimum version (force-update threshold)
|
|
23
|
-
- Optional update prompt copy override per app
|
|
24
|
-
|
|
25
|
-
## In-app reviews
|
|
26
|
-
|
|
27
|
-
- Android: Play In-App Review API
|
|
28
|
-
- iOS: `SKStoreReviewController` (StoreKit)
|
|
29
|
-
- Throttling guard so the prompt doesn't fire too often per user
|
|
30
|
-
|
|
31
|
-
## Backend templates
|
|
32
|
-
|
|
33
|
-
Three reference backends ship with the plugin so users can pick one:
|
|
34
|
-
|
|
35
|
-
- **Firestore-only** (`example-apps/firebase-backend`) — zero-cost on Firestore free tier; manifest stored as a Firestore document; bundles uploaded to user-controlled storage (e.g., the developer's Google Drive).
|
|
36
|
-
- **Node + Express** (`example-apps/node-express`) — vanilla Node REST server with on-disk bundles; good for self-hosted setups.
|
|
37
|
-
- **Laravel + Nova** (`backend/`) — full SaaS-grade backend with admin UI, multi-tenant API keys, channel management, rollout controls, signed download URLs.
|
|
38
|
-
|
|
39
|
-
## CLI tool
|
|
40
|
-
|
|
41
|
-
The `native-update` CLI (`cli/index.js`) helps with:
|
|
42
|
-
- Creating bundle ZIPs from a built web app
|
|
43
|
-
- Signing bundles with the developer's private key
|
|
44
|
-
- Computing checksums
|
|
45
|
-
- Uploading to one of the supported backends
|
|
46
|
-
- Rolling back a published manifest entry
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Native Update Website — Route Map
|
|
2
|
-
|
|
3
|
-
**Last Updated:** 2026-04-25
|
|
4
|
-
|
|
5
|
-
This is the public-facing marketing site + authenticated dashboard at https://nativeupdate.aoneahsan.com.
|
|
6
|
-
|
|
7
|
-
## Marketing routes (public, indexed)
|
|
8
|
-
|
|
9
|
-
| Path | Page | Purpose |
|
|
10
|
-
|---|---|---|
|
|
11
|
-
| `/` | HomePage | Hero, value props, social proof, CTA |
|
|
12
|
-
| `/features` | FeaturesPage | OTA, native update, in-app review feature deep dives |
|
|
13
|
-
| `/pricing` | PricingPage | Self-host (free) and SaaS tier copy |
|
|
14
|
-
| `/docs` | DocsPage | Docs landing — links to package docs tree |
|
|
15
|
-
| `/docs/*` | DocsMarkdownPage | Markdown-rendered package docs (mirrored from repo `docs/`) |
|
|
16
|
-
| `/about` | AboutPage | Project background and ethos |
|
|
17
|
-
| `/contact` | ContactPage | Developer contact info, support email |
|
|
18
|
-
| `/sitemap` | SitemapPage | Human-readable sitemap with category cards + fuzzy search |
|
|
19
|
-
| `/feed` | FeedPage | Public content/changelog feed |
|
|
20
|
-
| `/permissions` | PermissionsPage | Permission disclosures for app stores |
|
|
21
|
-
|
|
22
|
-
## Legal / info routes (public, indexed)
|
|
23
|
-
|
|
24
|
-
| Path | Page | Purpose |
|
|
25
|
-
|---|---|---|
|
|
26
|
-
| `/privacy` | PrivacyPage | GDPR/CCPA privacy policy |
|
|
27
|
-
| `/terms` | TermsPage | Terms of service |
|
|
28
|
-
| `/security` | SecurityPage | Data security disclosures |
|
|
29
|
-
| `/cookies` | CookiePolicyPage | Cookie usage |
|
|
30
|
-
| `/data-deletion` | DataDeletionPage | Account/data deletion (Play / App Store requirement) |
|
|
31
|
-
|
|
32
|
-
## Auth routes (public, NOINDEX)
|
|
33
|
-
|
|
34
|
-
| Path | Page | Purpose |
|
|
35
|
-
|---|---|---|
|
|
36
|
-
| `/login` | LoginPage | Google sign-in only |
|
|
37
|
-
| `/signup` | SignupPage | Same Google flow, separate landing |
|
|
38
|
-
|
|
39
|
-
## Dashboard routes (authenticated, NOINDEX)
|
|
40
|
-
|
|
41
|
-
| Path | Page | Purpose |
|
|
42
|
-
|---|---|---|
|
|
43
|
-
| `/dashboard` | DashboardOverview | Workspace overview |
|
|
44
|
-
| `/dashboard/apps` | AppsPage | Manage apps |
|
|
45
|
-
| `/dashboard/apps/:id` | AppDetailPage | Single app view |
|
|
46
|
-
| `/dashboard/builds` | BuildsPage | Build/bundle history |
|
|
47
|
-
| `/dashboard/builds/:id` | BuildDetailPage | Single bundle |
|
|
48
|
-
| `/dashboard/upload` | UploadPage | Upload a new bundle |
|
|
49
|
-
| `/dashboard/google-drive` | GoogleDrivePage | Google Drive connection |
|
|
50
|
-
| `/dashboard/config` | ConfigPage | Per-app config |
|
|
51
|
-
| `/dashboard/settings` | SettingsPage | Account settings |
|
|
52
|
-
| `/dashboard/rollouts` | RolloutsPage | Channel/rollout controls |
|
|
53
|
-
| `/dashboard/analytics` | AnalyticsPage | Update delivery metrics |
|
|
54
|
-
|
|
55
|
-
## Admin routes (super-admin only, NOINDEX)
|
|
56
|
-
|
|
57
|
-
| Path | Page | Purpose |
|
|
58
|
-
|---|---|---|
|
|
59
|
-
| `/admin` | AdminOverview | Admin landing |
|
|
60
|
-
| `/admin/users` | AdminUsersPage | User management |
|
|
61
|
-
| `/admin/apps` | AdminAppsPage | All apps across users |
|
|
62
|
-
| `/admin/builds` | AdminBuildsPage | All builds |
|
|
63
|
-
|
|
64
|
-
## Catch-all
|
|
65
|
-
|
|
66
|
-
| Path | Page | Purpose |
|
|
67
|
-
|---|---|---|
|
|
68
|
-
| `*` | NotFoundPage | Branded 404 with home + back CTAs |
|
|
69
|
-
|
|
70
|
-
## Discovery files (public, served at root by Vite)
|
|
71
|
-
|
|
72
|
-
`/robots.txt`, `/sitemap.xml`, `/feed.xml`, `/llms.txt`, `/llms-full.txt`, `/ai.txt`, `/humans.txt`, `/.well-known/security.txt`, `/manifest.json`, `/og-image.svg`.
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# Native Update — Tech Stack
|
|
2
|
-
|
|
3
|
-
**Last Updated:** 2026-04-25
|
|
4
|
-
|
|
5
|
-
## Plugin (root)
|
|
6
|
-
|
|
7
|
-
- TypeScript 5+
|
|
8
|
-
- Rollup (ESM + CJS dual build, `dist/`)
|
|
9
|
-
- ESLint flat config (`@typescript-eslint`)
|
|
10
|
-
- Capacitor 8 plugin API
|
|
11
|
-
- Native: Kotlin (Android), Swift (iOS)
|
|
12
|
-
|
|
13
|
-
## Marketing site + dashboard (`website/`)
|
|
14
|
-
|
|
15
|
-
- React 19 + TypeScript
|
|
16
|
-
- Vite 8
|
|
17
|
-
- Tailwind CSS v4
|
|
18
|
-
- Radix UI primitives (`@radix-ui/react-*`)
|
|
19
|
-
- `lucide-react` icons
|
|
20
|
-
- `framer-motion` for marketing-page animations
|
|
21
|
-
- React Router 7
|
|
22
|
-
- Firebase Auth (Google popup) + Firestore + Firebase Analytics
|
|
23
|
-
- Google Drive API (browser-side OAuth) for bundle storage
|
|
24
|
-
- `react-hook-form` + `zod` + `@hookform/resolvers` for all forms
|
|
25
|
-
- `zustand` for cross-component state
|
|
26
|
-
- `d3` for analytics charts
|
|
27
|
-
- `jszip` for bundle ZIP authoring
|
|
28
|
-
- `react-markdown` + `remark-gfm` for in-site markdown rendering
|
|
29
|
-
- Capacitor 8 for hybrid mobile distribution of the dashboard
|
|
30
|
-
- Capawesome `app-shortcuts` plugin
|
|
31
|
-
|
|
32
|
-
## CLI (`cli/`)
|
|
33
|
-
|
|
34
|
-
- Node 18+
|
|
35
|
-
- `commander` for CLI surface
|
|
36
|
-
- `chalk`, `ora` for terminal UX
|
|
37
|
-
- `axios` for HTTP
|
|
38
|
-
- `archiver` for ZIP generation
|
|
39
|
-
|
|
40
|
-
## Backend templates
|
|
41
|
-
|
|
42
|
-
- Firestore-only template — pure browser → Firestore writes
|
|
43
|
-
- Node + Express — vanilla REST server
|
|
44
|
-
- Laravel 11 + Nova 5 — full SaaS backend
|
|
45
|
-
|
|
46
|
-
## Infra
|
|
47
|
-
|
|
48
|
-
- Firebase Hosting (website + dashboard)
|
|
49
|
-
- Firestore for manifest metadata
|
|
50
|
-
- Google Drive (user-owned) for bundle ZIP storage
|
|
51
|
-
- GitHub for source + issues
|
|
52
|
-
- npm registry for plugin distribution
|
|
53
|
-
|
|
54
|
-
## Build outputs
|
|
55
|
-
|
|
56
|
-
- Plugin: `dist/esm/`, `dist/plugin.cjs.js`, `dist/plugin.js`, `dist/plugin.esm.js`
|
|
57
|
-
- Website: `website/dist/` (per-route static HTML prerendered for SEO)
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# AI Knowledge Base
|
|
2
|
-
|
|
3
|
-
Comprehensive project documentation for AI tools and onboarding contributors. Maintained per R-016 — review every 14 days.
|
|
4
|
-
|
|
5
|
-
| File | Topic |
|
|
6
|
-
|---|---|
|
|
7
|
-
| `00-project-profile.md` | What Native Update is, why it exists, audience, value props |
|
|
8
|
-
| `01-features.md` | Feature inventory: live updates, native updates, in-app reviews, backends, CLI |
|
|
9
|
-
| `02-routes.md` | Marketing site + dashboard route map |
|
|
10
|
-
| `03-tech-stack.md` | Languages, frameworks, libs, infra |
|
|
11
|
-
|
|
12
|
-
## When to update
|
|
13
|
-
|
|
14
|
-
- Significant feature addition or removal
|
|
15
|
-
- Route added or removed (always sync `02-routes.md` with `website/src/router.tsx`)
|
|
16
|
-
- Tech stack change (library replaced, major version bump)
|
|
17
|
-
- Distribution change (npm publish, hosting move)
|
|
18
|
-
|
|
19
|
-
## Update procedure
|
|
20
|
-
|
|
21
|
-
1. Edit the relevant file directly
|
|
22
|
-
2. Bump the `Last Updated` date at the top
|
|
23
|
-
3. Update `docs/rules-tracker.md` R-016 row date
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Analytics Tracking (R-024)
|
|
2
|
-
|
|
3
|
-
This registry lists every meaningful user action and where it is tracked.
|
|
4
|
-
|
|
5
|
-
**Service:** `website/src/lib/analytics.ts`
|
|
6
|
-
**Destinations:** Firebase Analytics (always on if Firebase config present) + Microsoft Clarity / Amplitude (off until their env keys are set)
|
|
7
|
-
|
|
8
|
-
**Last audited:** 2026-04-25
|
|
9
|
-
|
|
10
|
-
## Event vocabulary
|
|
11
|
-
|
|
12
|
-
| Event name | Where fired | Params |
|
|
13
|
-
|---|---|---|
|
|
14
|
-
| `page_view` | `usePageSEO` hook on every public page mount | `page_path`, `page_title` |
|
|
15
|
-
| `click` | High-intent CTAs in `Header`, `HomePage`, marketing CTAs | `element_name`, `location` |
|
|
16
|
-
| `form_submit` | UploadPage, SettingsPage, AppsPage, ContactPage | `form_name`, `success` |
|
|
17
|
-
| `external_link_click` | Footer social links, npm link, GitHub link | `url`, `link_text` |
|
|
18
|
-
| `download` | Bundle/manifest exports, sample-app download | `file_name`, `file_type` |
|
|
19
|
-
| `error` | `trackErrorEvent` for non-fatal flows | `error_message`, `error_location` |
|
|
20
|
-
| `app_error` | `trackError` from `errorTracking.ts` | `name`, `message`, plus context |
|
|
21
|
-
|
|
22
|
-
## Wiring guidance
|
|
23
|
-
|
|
24
|
-
```ts
|
|
25
|
-
import { trackEvent, trackClick, trackFormSubmit } from '@/lib/analytics';
|
|
26
|
-
|
|
27
|
-
trackEvent('upload_started', { app_id, channel });
|
|
28
|
-
trackClick('cta_view_pricing', 'home_hero');
|
|
29
|
-
trackFormSubmit('contact_form', true);
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Env keys
|
|
33
|
-
|
|
34
|
-
- `VITE_CLARITY_PROJECT_ID` — when set, calls `window.clarity('event', ...)` if the Clarity script is loaded
|
|
35
|
-
- `VITE_AMPLITUDE_API_KEY` — when set, calls `window.amplitude.track(...)` if the Amplitude SDK is loaded
|
|
36
|
-
|
|
37
|
-
When neither is set, the dual-write is a silent no-op — Firebase Analytics still receives the event so the dashboard does not go blind.
|