Package an IPA on Windows

How to package D2R Mobile v2.3.0 on Windows 10/11 manually using clean shell archives, SPIRV-Cross, and d2rm_pack.py—plus easier 1-click IPA and 2-click GUI Prep Assistant v0.2.0 alternatives.

Easier options Prep Assistant v0.2.0 GUI or iOS Guide
v2.3.0 shells Clean iOS 26+ & iOS 18–25 shells
Shader pin SPIRV-Cross vulkan-sdk-1.4.357.0 / 1.4.363.0
Free disk space ~12 GB for build cache & temp files
On this page (11 sections)

Want an easier path first? You don't have to install LLVM, CMake, or compile spirv-cross by hand to play on iPhone or iPad: - Fastest route: Download a prebuilt v2.3.0-build.20.1 community IPA (with precompiled Metal shaders already inside) directly on the iPhone & iPad Install Guide and sideload it via Sideloadly. - 2-click GUI route: Use our open-source D2R Prep Assistant v0.2.0 desktop app, which automatically sets up portable dependencies in an isolated folder and builds your IPA, Legacy Device Pack, or Android android/ folder with point-and-click controls. - Android route: On Windows, you can also generate an Android v2.3.0 import folder in 2 clicks — see the Android Setup Guide.

Continue below only if you specifically want the manual command-line packaging workflow.


Overview

The experimental no-Xcode CLI route assembles an unsigned iOS package (.ipa) on Windows 10 or 11 without a Mac. Upstream reports an end-to-end Windows 11 packaging test, though the resulting no-Xcode IPA and signing route have not completed a site-verified iPhone/iPad physical installation test.

Instead of compiling native iOS code from scratch, you download an official pre-built clean shell package (containing zero copyrighted game content) and use dm/tools/d2rm_pack.py to inject your Switch 1.0.34.0 files, translated shaders, and UI assets into an unsigned .ipa.


Windows Requirements

Ensure the following dependencies are installed on Windows 10 or 11 (64-bit):

  1. Python 3.9 or later (with Add python.exe to PATH checked during installation): cmd python -m pip install pillow numpy lz4 capstone unicorn
  2. C Compiler & Toolchain:
  3. Install LLVM (providing clang and clang++).
  4. Install .NET 10 SDK.
  5. Install Git, CMake, and Ninja.
  6. SPIRV-Cross Compiler:
  7. Build SPIRV-Cross from source pinned to the tag required by your v2.3.0 source (vulkan-sdk-1.4.357.0 or vulkan-sdk-1.4.363.0 matching dm/gfx/tools/dmsh_chain.lock): cmd git clone --branch vulkan-sdk-1.4.357.0 --depth 1 https://github.com/KhronosGroup/SPIRV-Cross cmake -S SPIRV-Cross -B SPIRV-Cross/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DSPIRV_CROSS_ENABLE_TESTS=OFF cmake --build SPIRV-Cross/build --target spirv-cross
  8. Add SPIRV-Cross\build\ (containing spirv-cross.exe) to your system PATH. (Note: Exact SPIRV-Cross versioning is strictly required because shader translations differ across versions; d2rm_pack.py validates shader source digests and halts on mismatches.)
  9. Disk Space: Approximately 12 GB free for intermediate caches and working files.
  10. Game Files: Switch release 1.0.34.0 (3.3.94012), dumped from your own console, containing ExeFS and RomFS (see files checklist).

Step 1: Download the v2.3.0 Shell and Clone Source

  1. Clone the repository and check out the exact v2.3.0 tag matching your shell before packaging. An unpinned clone can drift from the shell release and fail digest checks: cmd git clone --branch v2.3.0 https://github.com/jhaizhou-ops/d2r-mobile.git cd d2r-mobile
  2. Download the matching clean shell archive directly (these clean shells contain zero game content):
  3. iOS / iPadOS 26+: D2RMobile-shell-build-input.zip
  4. iOS / iPadOS 18–25: D2RMobile-shell-ios18-build-input.zip
  5. Checksums: SHA256SUMS.txt

Step 2: Run the Packaging Tool

Execute dm/tools/d2rm_pack.py with positional arguments:

python dm/tools/d2rm_pack.py <shell.zip> <game_files_directory> <output.ipa>

Example:

python dm/tools/d2rm_pack.py D2RMobile-shell-build-input.zip C:\d2r\Update d2r-output.ipa

Argument Details

  • <shell.zip>: Path to D2RMobile-shell-build-input.zip (iOS 26+) or D2RMobile-shell-ios18-build-input.zip (iOS 18–25).
  • <game_files_directory>: The directory containing both ExeFS/ and RomFS/.
  • <output.ipa>: Desired path for the generated unsigned .ipa.

What the Packager Does

  1. Rewrites the Switch game executable into a dynamic library.
  2. Extracts and generates UI assets and data tables from game files.
  3. Translates game shaders into Metal Shading Language (MSL) text using spirv-cross.
  4. Assembles the final package (approx. 130–160 MB).
  5. The first run takes 10–12 minutes (primarily shader translation); subsequent runs skip already-completed steps.

(Note: During shader translation, the tool updates dm/gfx/tools/dmsh_chain.lock and dm/gfx/nvn/dmsh_chain.h with local toolchain versions; this is expected behavior.)


Older Devices (A14–A16 Chips)

If packaging for an iPhone 13 Pro, iPhone 14 series, iPhone 15 / 15 Plus, or other supported A14–A16 6 GB device:

  1. Download ARM astcenc 5.2.0 (bin/astcenc-avx2.exe for Windows) or let D2R Prep Assistant v0.2.0 fetch and run it for you automatically.
  2. Generate the texture pack: cmd python dm/tools/astc_pack.py <game_files_directory>/RomFS out_dir/work --astcenc <path_to_astcenc> --preset thorough python dm/tools/casc_overlay.py pack <game_files_directory>/RomFS out_dir/pack out_dir/work/repl.tsv 0-8 python dm/tools/astc_pack.py finalize out_dir/pack
  3. Set D2RM_ASTC_PACK before packaging: cmd set "D2RM_ASTC_PACK=%CD%\out_dir\pack" python dm/tools/d2rm_pack.py <shell.zip> <game_files_directory> <output.ipa>
  4. Copy the resulting out_dir\pack\Legacy Device Pack folder to your phone alongside D2R Mobile Resources.

Step 3: Sign and Sideload onto Your iOS Device

  1. Connect your iPhone or iPad to your PC via USB.
  2. Download and open Sideloadly (or AltStore).
  3. Drag your generated d2r-output.ipa into the tool, enter your personal Apple ID, and click Start.
  4. On your iOS device:
  5. Navigate to Settings → General → VPN & Device Management, find your developer certificate under Developer App, and tap Trust.
  6. Enable Developer Mode in Settings → Privacy & Security → Developer Mode and reboot if prompted.

Step 4: Transfer Game Resources

The install package does not bundle the 5.6 GB of game assets:

  1. Put the 18 .data files from RomFS/data inside D2R Mobile Resources/data/.
  2. Connect your phone to your PC, open the Apple Devices app or iTunes, go to File Sharing → D2R Mobile, and copy D2R Mobile Resources in (plus Legacy Device Pack if on A14–A16).
  3. Return to the app and tap Retry.

First Launch: Preparing Shaders

Because the package was assembled on Windows without Apple's Metal shader compiler:

  • Upon launching, the app displays a "First launch: preparing shaders" screen with a progress bar and remaining time estimate.
  • It compiles all shaders on the phone once (measured upstream at approx. 7 minutes for 7,212 shaders on an iPhone 17 Pro Max).
  • The device will become warm as CPU cores run at full capacity.
  • Interruption is supported: You can safely switch apps or close the game. When reopened, already-compiled shaders are verified in less than a millisecond, and compilation resumes from cache.
  • Once complete, the game boots directly into the main menu. Subsequent launches skip compilation entirely.

Operational Notes

  • End-to-End Test Status: Upstream verified the Windows packaging workflow on Windows 11 with Python 3.12, confirming byte-identical executable outputs compared to Mac-generated packages. Physical device installation of a Windows-packaged v2.3.0 IPA remains unverified by this guide.
  • Performance Expectations: In-game performance depends on device SoC and thermal limits; figures cited represent upstream test logs rather than guaranteed site benchmarks.

Frequently Asked Questions

Do I really need to compile SPIRV-Cross and run Python commands myself?

Only if you want to run the upstream CLI manually. Most players either grab a prebuilt v2.3.0 community IPA on the iPhone & iPad guide (which also includes precompiled Metal shaders) or use our open-source D2R Prep Assistant v0.2.0 GUI app, which fetches portable tools automatically.

Can I download a prebuilt spirv-cross.exe installer for Windows?

The reviewed upstream route builds SPIRV-Cross from source using Git, CMake, Ninja, and LLVM. SPIRV-Cross—not LLVM itself—is pinned to the exact vulkan-sdk tag matching your v2.3.0 checkout. Other versions translate shaders differently and fail the packaging tool's digest validation.

What happens during first launch on the phone?

Because Windows lacks Apple's Metal shader compiler, shaders are included as MSL source text. On first launch, the phone compiles shaders on-device (approx. 7 minutes for 7,212 shaders on an iPhone 17 Pro Max). You may safely switch apps or close the app; the system caches compiled shaders and resumes quickly upon relaunch.

Does sideloading with a free Apple ID last permanently?

No. Apple enforces a 7-day expiration policy for personal free Apple ID certificates. You must re-sign and refresh the application weekly using Sideloadly or AltStore. Keep the same app identity, install over the existing app, and back up saves first. Do not uninstall it as a renewal step.