When you run npm run build, the following happens:
- Next.js builds the static site - Creates optimized HTML, CSS, and JS in the
out/directory - Copies builds directory - The
scripts/copy-builds.jsscript automatically copies thebuilds/directory toout/builds/
This ensures that all IPA files are accessible for AltStore/SideStore downloads.
npm run buildThis will:
- Build the Next.js site with Turbopack
- Copy the
builds/directory toout/builds/ - Display the total size of copied files
After building, deploy the out/ directory:
# The out/ directory contains everything needed:
out/
├── builds/ # IPA files (copied from builds/)
├── api/ # Static JSON feeds
├── downloads/ # Downloads page
└── ... # Other static pages-
Large Files: IPA files can be large (80+ MB each). Make sure your hosting supports large files.
-
Git LFS: If committing builds to Git, consider using Git LFS:
git lfs track "*.ipa" git add .gitattributes -
CDN Alternative: For better performance, you can host IPA files on a CDN and update the
NEXT_PUBLIC_BASE_URLaccordingly.
Set these in your deployment environment:
NEXT_PUBLIC_BASE_URL=https://icube-emu.comAfter building, verify the builds are copied:
ls -lh out/builds/You should see your version directories with IPA files.
To test the static build locally:
npm run build
npx serve outThen test the feed:
This means the IPA files aren't accessible. Check:
- The
out/builds/directory exists and contains IPA files - Your hosting serves the files correctly (check MIME types)
- The download URLs in the feed match your actual file locations
If scripts/copy-builds.js fails:
- Ensure the
builds/directory exists - Check file permissions
- Verify Node.js can access the directories
If the build is too large:
- Consider hosting IPA files separately (GitHub Releases, CDN)
- Update download URLs in the feed to point to external hosting
- Remove the copy-builds script and manage files manually