A complete Progressive Web App (PWA) that can be installed on iOS 12+ and Windows.
--> Completely generated by AI Claude Sonnet 4.5 <--
- π² Installable: Add to home screen on iOS and Windows
- π Offline Support: Works without internet connection using Service Worker
- π± Responsive Design: Optimized for mobile and desktop
- πΎ Local Storage: Save notes and preferences locally
- π¨ Theme Customization: Change background colors
- π Connection Status: See online/offline status in real-time
- Open Safari and navigate to your hosted PWA URL
- Tap the Share button (box with arrow)
- Scroll down and tap "Add to Home Screen"
- Tap "Add" to confirm
- The app icon will appear on your home screen
- Open Chrome, Edge, or other Chromium browser
- Navigate to your hosted PWA URL
- Click the install icon in the address bar (+ or install button)
- Click "Install" to confirm
- The app will launch in a standalone window
- Open Chrome browser
- Navigate to your hosted PWA URL
- Tap the menu (three dots) and select "Add to Home Screen"
- Or use the install prompt that appears automatically
To test the PWA locally, you need to serve it over HTTPS or localhost:
# Python 3
python -m http.server 8000
# Visit: http://localhost:8000# Install http-server globally
npm install -g http-server
# Run server
http-server -p 8000
# Visit: http://localhost:8000- Install "Live Server" extension in VS Code
- Right-click
index.html - Select "Open with Live Server"
To make your PWA installable on iOS and Windows, deploy it to a hosting service with HTTPS:
- GitHub Pages: Free, HTTPS enabled
- Netlify: Free tier with HTTPS
- Vercel: Free tier with HTTPS
- Azure Static Web Apps: Free tier available
- Firebase Hosting: Free tier available
- Create a GitHub repository
- Push your code to the repository
- Go to Settings β Pages
- Select your branch and save
- Your PWA will be available at
https://yourusername.github.io/repo-name
webapp/
βββ index.html # Main HTML file with PWA meta tags
βββ manifest.json # Web app manifest for installability
βββ sw.js # Service worker for offline functionality
βββ app.js # Main application JavaScript
βββ styles.css # Styling and responsive design
βββ generate_icons.py # Script to generate app icons
βββ icons/ # App icons in various sizes
β βββ icon-72x72.png
β βββ icon-96x96.png
β βββ icon-128x128.png
β βββ icon-144x144.png
β βββ icon-152x152.png
β βββ icon-167x167.png
β βββ icon-180x180.png
β βββ icon-192x192.png
β βββ icon-384x384.png
β βββ icon-512x512.png
βββ README.md # This file
- β
Apple-specific meta tags (
apple-mobile-web-app-capable) - β Apple touch icons in multiple sizes
- β Status bar styling for iOS
- β Viewport configuration for iOS devices
- β Web app manifest for modern iOS versions
- β Web app manifest with proper configuration
- β Service worker for offline functionality
- β Install prompt handling
- β Desktop-optimized responsive design
- β Multiple icon sizes for different displays
- β Service Worker registration
- β Offline caching strategy
- β App install prompt
- β Standalone display mode
- β Theme color customization
- β Responsive design
- β Local storage for data persistence
- β iOS Safari 12+
- β Chrome (Desktop & Mobile)
- β Edge (Desktop & Mobile)
- β Firefox (limited PWA support)
- β Opera
- β Samsung Internet
The service worker (sw.js) caches all static assets and provides offline functionality. It uses a cache-first strategy for better performance.
The manifest.json defines how the app appears when installed, including:
- App name and short name
- Display mode (standalone)
- Theme colors
- Icons in multiple sizes
- Start URL
Icons are generated in 10 different sizes to support:
- Various iOS devices and display densities
- Android devices
- Windows tiles
- Browser favicons
- Ensure you're using Safari browser
- Check that all required icons are present
- Verify apple-mobile-web-app meta tags are correct
- Make sure the site is served over HTTPS (or localhost)
- Use Chrome or Edge browser
- Ensure manifest.json is valid
- Check that Service Worker is registered successfully
- Verify HTTPS is enabled (or using localhost)
- Clear browser cache
- Unregister the old service worker in DevTools
- Increment the cache version in
sw.js
Edit manifest.json:
{
"name": "Your App Name",
"short_name": "YourApp"
}Edit both index.html and manifest.json:
<meta name="theme-color" content="#your-color">- Replace icon files in the
icons/directory - Or modify
generate_icons.pyand regenerate
MIT License - feel free to use and modify for your projects!
Built as a demonstration PWA compatible with iOS 12+ and Windows.