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
Enhanced build-native.sh to automatically build plugin and test app together:
- Detects test app directory presence
- Builds plugin AAR first
- Removes stale AAR from test app's libs directory
- Ensures symlink is in place for fresh plugin source
- Builds test app with latest plugin code
- Provides install command with APK path
This automates the manual AAR copying workflow, ensuring test app
always uses the latest plugin build without stale artifacts.
The build process now:
1. Builds TypeScript interface
2. Builds plugin AAR
3. Removes any stale AAR from libs/
4. Creates/verifies symlink to plugin source
5. Builds test app APK
6. Provides install command
Benefits:
- No manual file copying required
- Fresh plugin code always included
- Single command to rebuild everything
- Fix sed -i syntax differences between macOS and Linux
- macOS requires empty string after -i flag: sed -i '' 'pattern' file
- Linux uses: sed -i 'pattern' file
- Add OSTYPE detection to handle both platforms correctly
- Fixes build script failures on macOS systems
Resolves: sed command a expects \ followed by text error on macOS
- Add detailed inline documentation in build-native.sh explaining the problem, why it happens, and the solution
- Update fix-capacitor-build.sh with comprehensive header documentation
- Include clear explanations of when the fix gets overwritten and how to restore it
- Add user-friendly output with emojis and clear messaging
- Document the automatic fix process with step-by-step explanations
This provides complete transparency about what the scripts do and why,
making it easy for developers to understand and maintain the fix.
- Create fix-capacitor-build.sh script to restore fixes after Capacitor operations
- Update build-native.sh to automatically apply fix when needed
- Add warnings to BUILDING.md about auto-generated file risks
- Document which Capacitor commands will overwrite manual fixes
This protects against losing the capacitor.build.gradle fix when running
npx cap sync, npx cap update, or other Capacitor CLI commands.
- Detect when this is a plugin development project vs full Capacitor app
- Skip Android test app build when Capacitor integration files are missing
- Provide helpful warnings about plugin development workflow
- Allow successful build completion for plugin source code only
This fixes the Gradle build failure when trying to build a plugin
development project that doesn't have a properly initialized test app.
- Update AAR file verification path from 'build/outputs/aar/daily-notification-release.aar'
to 'capacitor-cordova-android-plugins/build/outputs/aar/capacitor-cordova-android-plugins-release.aar'
- Fixes build script error where it couldn't find the generated AAR file
- Android builds now complete successfully without false error messages
The build script was looking for a non-existent file path, causing the build to fail
even though the Android compilation was successful. This aligns the verification
path with the actual Gradle output structure.
- Add build scripts for Android and iOS platforms
- Remove duplicate web implementation (src/web.ts)
- Add proper TypeScript configuration
- Add module documentation to index.ts
- Clean up package.json scripts
This commit improves the project structure and build process by:
1. Adding dedicated build scripts for native platforms
2. Removing redundant web implementation
3. Adding proper TypeScript configuration with strict mode
4. Improving code documentation
5. Organizing package.json scripts
The changes maintain backward compatibility while improving
the development experience and code quality.