- Generate app icons in multiple sizes (192x192, 512x512, 180x180, 32x32) - Create favicon and apple-touch-icon SVG files - Add comprehensive PWA meta tags in app layout - Configure theme color (#3B82F6) and background color - Update manifest.json with icon references (PNG and SVG) - Create icon generation scripts (SVG and PNG conversion) - Add browser-based PNG icon generator (HTML) - Create comprehensive PWA testing guide - Add icon setup documentation Requirements: 4.1, 4.2 Task: 13. Add PWA assets and metadata
8.4 KiB
PWA Testing Guide - Ultimate Lists App
Overview
This guide helps you test the Progressive Web App (PWA) functionality of the Ultimate Lists app, with a focus on iOS Safari installation.
Prerequisites
Generate PNG Icons First
Before testing, you need to generate PNG versions of the icons:
Option 1: Browser-based Generator (Easiest)
- Open
scripts/generate-png-icons.htmlin your browser - Click "Download All Icons"
- Save each PNG file to the
public/directory
Option 2: Using Sharp
npm install --save-dev sharp
node scripts/convert-with-sharp.js
Option 3: Using ImageMagick
brew install imagemagick # macOS
convert public/icon-192.svg -resize 192x192 public/icon-192.png
convert public/icon-512.svg -resize 512x512 public/icon-512.png
convert public/apple-touch-icon.svg -resize 180x180 public/apple-touch-icon.png
convert public/favicon.svg -resize 32x32 public/favicon-32.png
Testing on iOS Safari
Step 1: Deploy or Use Local Network
The PWA must be served over HTTPS or localhost. For iOS testing:
Option A: Deploy to Vercel/Netlify
npm run build
# Deploy to your hosting provider
Option B: Local Network Testing
- Find your local IP:
ifconfig | grep "inet " | grep -v 127.0.0.1 - Run dev server:
npm run dev - Access from iPhone:
http://YOUR_IP:3000 - Note: Service workers require HTTPS in production
Step 2: Test Installation on iPhone/iPad
-
Open Safari on your iOS device
- Navigate to your app URL
- Ensure the app loads correctly
-
Add to Home Screen
- Tap the Share button (square with arrow)
- Scroll down and tap "Add to Home Screen"
- Verify the icon preview looks correct
- Verify the name is "Ultimate Lists"
- Tap "Add"
-
Verify Home Screen Icon
- Check that the icon appears on your home screen
- Verify the icon is clear and not blurry
- Verify the icon has the correct colors (blue background, white checkmark)
-
Launch the App
- Tap the icon on your home screen
- The app should open in standalone mode (no Safari UI)
- Verify the status bar style (should be translucent)
- Verify the app fills the screen properly
Step 3: Test PWA Features
Standalone Mode
- ✓ No Safari address bar visible
- ✓ No Safari toolbar at bottom
- ✓ App uses full screen (respecting safe areas)
- ✓ Status bar is styled correctly
Offline Functionality
- ✓ Enable Airplane Mode
- ✓ Open the app (should still load)
- ✓ Navigate between pages (should work)
- ✓ Create/edit tasks (should queue for sync)
- ✓ Disable Airplane Mode
- ✓ Verify changes sync to server
App Behavior
- ✓ App remembers state between launches
- ✓ Smooth navigation without page reloads
- ✓ Touch interactions work properly
- ✓ Forms and inputs work correctly
Testing on Android Chrome
Step 1: Access the App
- Open Chrome on Android device
- Navigate to your app URL
- Ensure the app loads correctly
Step 2: Install the App
- Look for the "Add to Home screen" prompt (may appear automatically)
- Or tap the menu (⋮) → "Add to Home screen" or "Install app"
- Verify the icon and name
- Tap "Add" or "Install"
Step 3: Test PWA Features
- ✓ App opens in standalone mode
- ✓ Icon appears in app drawer
- ✓ Offline functionality works
- ✓ Can uninstall like a native app
Testing on Desktop
Chrome/Edge
- Open the app in Chrome or Edge
- Look for the install icon (⊕) in the address bar
- Click to install
- App opens in a standalone window
- Test offline mode using DevTools (Network → Offline)
Safari (macOS)
- Open the app in Safari
- File → Add to Dock
- App appears in Dock
- Opens in standalone window
Verification Checklist
Icons
- Favicon appears in browser tab
- Home screen icon is clear and properly sized
- Icon has correct colors and design
- Icon is not blurry or pixelated
- Icon works on both light and dark backgrounds
Manifest
- App name displays correctly
- Theme color matches design (#3B82F6)
- Background color is white
- Display mode is "standalone"
- Orientation is set correctly
Meta Tags
- Apple touch icon loads correctly
- Status bar style is appropriate
- Viewport settings work on mobile
- Theme color appears in browser UI
Service Worker
- Service worker registers successfully
- Static assets are cached
- App works offline
- Updates are handled properly
User Experience
- App loads quickly
- Navigation is smooth
- Touch targets are appropriately sized
- Forms work correctly
- Data persists between sessions
Troubleshooting
Icon Not Showing on iOS
Problem: Default icon or no icon appears
Solutions:
- Ensure PNG files exist (iOS doesn't support SVG for touch icons)
- Check file paths in
app/layout.tsx - Verify files are in
public/directory - Clear Safari cache: Settings → Safari → Clear History and Website Data
- Remove and re-add to home screen
App Not Installing
Problem: No "Add to Home Screen" option
Solutions:
- Ensure manifest.json is accessible at
/manifest.json - Check browser console for errors
- Verify HTTPS (required for service workers)
- Check manifest.json syntax is valid
- Ensure all required manifest fields are present
Service Worker Not Working
Problem: App doesn't work offline
Solutions:
- Check browser console for service worker errors
- Verify service worker file is at
/sw.js - Ensure HTTPS (service workers require secure context)
- Check service worker registration in DevTools
- Try unregistering and re-registering service worker
Icon Blurry or Wrong Size
Problem: Icon appears pixelated or wrong dimensions
Solutions:
- Regenerate PNG icons at correct sizes
- Ensure PNG files are not compressed too much
- Verify icon dimensions match manifest.json
- Use higher resolution source images
- Test on actual device (not just simulator)
App Not Opening in Standalone Mode
Problem: Safari UI still visible when opening from home screen
Solutions:
- Check
apple-mobile-web-app-capablemeta tag is set to "yes" - Verify manifest.json has
"display": "standalone" - Remove and re-add to home screen
- Check for JavaScript errors preventing proper initialization
Testing Tools
Browser DevTools
- Chrome DevTools: Application → Manifest / Service Workers
- Safari DevTools: Develop → Show Web Inspector → Storage
- Lighthouse: Run PWA audit for comprehensive check
Online Tools
- PWA Builder - Test and validate PWA
- Manifest Validator - Validate manifest.json
- Web.dev PWA Checklist - Comprehensive checklist
Command Line
# Check if files exist
ls -la public/*.png public/*.svg public/manifest.json
# Validate manifest.json
cat public/manifest.json | jq .
# Check service worker
curl http://localhost:3000/sw.js
Best Practices
Icon Design
- Use simple, recognizable shapes
- Ensure good contrast
- Test on both light and dark backgrounds
- Keep important content in the center 80%
- Use consistent branding colors
Testing Workflow
- Test on actual devices (not just simulators)
- Test on multiple iOS versions
- Test on different Android devices
- Test offline functionality thoroughly
- Test on slow network connections
- Test with different screen sizes
Deployment
- Always use HTTPS in production
- Set appropriate cache headers
- Version your service worker
- Monitor service worker updates
- Test after each deployment
Success Criteria
Your PWA is ready when:
- ✓ Installs successfully on iOS Safari
- ✓ Installs successfully on Android Chrome
- ✓ Icon appears correctly on all platforms
- ✓ Opens in standalone mode (no browser UI)
- ✓ Works offline for core functionality
- ✓ Passes Lighthouse PWA audit
- ✓ Provides native-like experience
- ✓ Handles updates gracefully