feat(ios): add iOS deployment support and web assets parity
Add comprehensive iOS build and deployment infrastructure with command-line tooling, documentation, and web assets synchronization. Changes: - Update Capacitor dependencies to v6.0 in podspec - Add iOS build support to build-native.sh with NVM integration - Sync iOS web assets to match www/ source directory - Create deployment scripts for both native iOS app and Vue 3 test app - Add comprehensive iOS simulator deployment documentation - Document web assets parity requirements between Android and iOS This enables: - Command-line iOS builds without Xcode UI - Automated deployment to iOS simulators - Consistent web assets across platforms - Clear separation between native iOS app (ios/App) and Vue 3 test app Files modified: - ios/DailyNotificationPlugin.podspec (Capacitor 6.0) - ios/App/App/public/index.html (synced from www/) - scripts/build-native.sh (iOS build support) Files added: - docs/WEB_ASSETS_PARITY.md - docs/standalone-ios-simulator-guide.md - scripts/build-and-deploy-native-ios.sh - test-apps/daily-notification-test/docs/IOS_BUILD_QUICK_REFERENCE.md - test-apps/daily-notification-test/scripts/build-and-deploy-ios.sh
This commit is contained in:
64
docs/WEB_ASSETS_PARITY.md
Normal file
64
docs/WEB_ASSETS_PARITY.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# Web Assets Structure - Android and iOS Parity
|
||||
|
||||
**Author**: Matthew Raymer
|
||||
**Date**: November 4, 2025
|
||||
|
||||
## Source of Truth
|
||||
|
||||
The **`www/`** directory is the source of truth for web assets. Both Android and iOS app directories should match this structure.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
www/ # Source of truth (edit here)
|
||||
├── index.html # Main test interface
|
||||
|
||||
android/app/src/main/assets/ # Android (synced from www/)
|
||||
├── capacitor.plugins.json # Auto-generated by Capacitor
|
||||
└── public/ # Web assets (must match www/)
|
||||
└── index.html # Synced from www/index.html
|
||||
|
||||
ios/App/App/ # iOS (synced from www/)
|
||||
├── capacitor.config.json # Capacitor configuration
|
||||
└── public/ # Web assets (must match www/)
|
||||
└── index.html # Synced from www/index.html
|
||||
```
|
||||
|
||||
## Synchronization
|
||||
|
||||
Both `android/app/src/main/assets/public/` and `ios/App/App/public/` should match `www/` after running:
|
||||
|
||||
```bash
|
||||
# Sync web assets to both platforms
|
||||
npx cap sync
|
||||
|
||||
# Or sync individually
|
||||
npx cap sync android
|
||||
npx cap sync ios
|
||||
```
|
||||
|
||||
## Key Points
|
||||
|
||||
1. **Edit source files in `www/`** - Never edit platform-specific copies directly
|
||||
2. **Both platforms should match** - After sync, `android/.../assets/public/` and `ios/App/App/public/` should be identical
|
||||
3. **Capacitor handles sync** - `npx cap sync` copies files from `www/` to platform directories
|
||||
4. **Auto-generated files** - `capacitor.plugins.json`, `capacitor.js`, etc. are generated by Capacitor
|
||||
|
||||
## Verification
|
||||
|
||||
After syncing, verify both platforms match:
|
||||
|
||||
```bash
|
||||
# Check file sizes match
|
||||
ls -lh www/index.html android/app/src/main/assets/public/index.html ios/App/App/public/index.html
|
||||
|
||||
# Compare contents
|
||||
diff www/index.html android/app/src/main/assets/public/index.html
|
||||
diff www/index.html ios/App/App/public/index.html
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- **Cordova files**: iOS may have empty `cordova.js` and `cordova_plugins.js` files. These are harmless but should be removed if not using Cordova compatibility.
|
||||
- **Capacitor runtime**: Capacitor generates `capacitor.js` and `capacitor_plugins.js` during sync - these are auto-generated and should not be manually edited.
|
||||
|
||||
Reference in New Issue
Block a user