How to automate app icon export with ci/cd scripts for ios and android
- Step 1Add the icon generation script — Create scripts/generate-app-icons.js. Read the brand SVG from assets/brand.svg, POST to the JAD App Icon Generator API with platform: ['ios', 'android'], and unzip the response into the correct project directories.
- Step 2Trigger on SVG changes — In GitHub Actions, add a path filter: on: push: paths: ['assets/brand.svg']. The icon generation job runs only when the brand SVG changes, keeping CI fast for all other pushes.
- Step 3Commit generated icons — The workflow commits the generated icon files back to the branch with git commit -m 'chore: regenerate app icons from brand.svg'. Icons are version-controlled alongside the SVG source.
Frequently asked questions
Should app icons be committed to the repository or generated at build time?+
Committed. App icons are binary assets (PNG) that your IDE and build tools expect to find in specific locations. Generating them at build time adds fragility — if the API is unavailable during a build, your app cannot be built. Commit the PNGs and regenerate only when the SVG changes.
How do I integrate icon generation into a Fastlane lane?+
Create a custom Fastlane action that calls the JAD API. Place the action file in fastlane/actions/generate_app_icons.rb. Call it from your update_brand lane: generate_app_icons(svg_path: 'assets/brand.svg'). Chain this lane before any app store upload lane.
Can I preview the generated icons in a pull request?+
Yes. Use the GitHub Actions PNG diff viewer or a custom step that renders the icons and posts them as a PR comment using the GitHub API. This lets designers review the icon output before merging the brand update.
What happens if the SVG contains unsupported features for rasterization?+
The API rasterizes using a headless browser (Chromium) which supports the full SVG 1.1 and most SVG 2 feature set. Filters, gradients, masks, and clip paths all work. The only unsupported case is JavaScript-driven SVG animations, which are static in the rasterized output.
Privacy first
Every JAD SVG tool runs entirely in your browser using the DOM API and Canvas. Your SVG files never leave your device — verified by zero outbound network requests during processing.