- 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.