Skip to content

About

PvZ2: Reflourished native port for iPhone, iPad, Mac and Windows

Topics

Resources

Contributing

Stars

82 stars

Watchers

1 watching

Forks

Repository files navigation

Reflourished-Darwin

PvZ2: Reflourished on iPhone, iPad, Mac and Windows

PvZ2: Reflourished natively on iPhone, iPad, Mac and Windows.
No jailbreak, no JIT, no emulator.

The mod's Android code is converted into ordinary code for each system, so the game runs the way any other app does: full screen, at your display's refresh rate, with sound, saves and the mod's own content built in.

Latest release Downloads Game version iPhone and iPad Mac Windows Stars

Download · Features · Install guide · Build it yourself · How it works


Features

A real app
  • Full screen, with sound, saves and the mod's own content built in.
  • Leaving the app pauses the game; coming back shows its pause menu.
  • On iPhone and iPad, a swipe from the top or bottom edge needs a second swipe to open Notification Center, Control Center or Home, so a stray swipe doesn't pause the game.
  • Import/Export saves, quests and levels through the game's own menu.
Unlocked frame rate - turn on Target 60 FPS in the game's settings
  • The game runs at your display's refresh rate: 120 Hz on ProMotion displays.
  • Turn on Target 60 FPS in the game's own settings for that; with it off, the game runs at 60.
Touch, mouse and trackpad
  • They work as on Android.
Keyboard (Mac, Windows, and iPad with a keyboard)
  • 1-4 and Q, W, E, R take the seed packets, S the shovel.
  • Space collects every sun, coin, gem, plant food and sprout drop on the lawn.
  • Tab toggles fast-forward, F picks up plant food, and Z, X, C select the level's power-ups from left to right.
  • Esc pauses and resumes. The keys rest while the game is paused.
  • On the Mac and Windows, Settings (Cmd-, / Ctrl-,) lets you pick any keys; Keyboard → Show keys in levels (on by default) writes each key at its control's corner in the game's font.
  • Plant on: Release / Press in Mac Keyboard or Windows Gameplay settings chooses when the click after a keyboard seed or shovel pick takes effect. Release is the default. Press completes the tap on button down and ignores that click's remaining drag and release. Ordinary seed-packet drags and other clicks are unchanged.
  • On iPad, keys appear after the first press on a hardware keyboard.
Mac window
  • Shows the selected plant or shovel at the pointer during a level; turn it off in Keyboard settings.
  • Keeps the game's shape at any size, or, in Settings, adapts to any shape from 4:3 to 21:9.
  • Drawn at the sharpness of the display it is on; Settings can draw it sharper on a display that isn't Retina.
  • Cmd-M and Cmd-H pause the game.
Windows
  • One setup for Intel/AMD and ARM PCs. It installs for your account only, with no administrator prompt.
  • A window you can resize, or full screen (F11 or Alt+Enter); Settings with Ctrl-, or a right-click on the game's taskbar button.
  • The plant you picked follows the pointer, with the same keys and key labels as on the Mac.
  • Prefer no installer? The portable zips keep everything, saves included, in the folder you unpack them to.
Updates
  • The Mac app updates itself: it checks once a day and asks before it installs (PvZ2 Reflourished > Check for Updates…). So does the installed Windows game (Settings > About, or Check for Updates… on its taskbar button); the portable zips don't.
  • iPhone and iPad get updates through AltStore and SideStore with this repository's source.
  • Your saves stay, and a full app needs no second 1.3 GB download.

Screenshots

Show screenshots
PvZ2: Reflourished in a Mac window: Far Future Day 22 with plants, zombies and the performance overlay
Mac - with the performance overlay.
PvZ2: Reflourished in landscape on an iPhone, its seed packets clear of the Dynamic Island
iPhone - clear of the Dynamic Island.
PvZ2: Reflourished's Almanac in a window on an iPad, next to Safari
iPad - in a window, next to your other apps.
The Mac app's own Settings window: window mode, aspect ratio, closing and sharpness
Settings - window shape, sharpness, keys.
The Mac disk image window: drag PvZ2 Reflourished onto the Applications folder
Install - drag it to Applications.

Install

Every release has these downloads:

File What it is
PvZ2-Reflourished-<game>-Darwin-<version>-iOS.ipa iPhone and iPad, slim (about 60 MB)
PvZ2-Reflourished-<game>-Darwin-<version>-iOS-Full.ipa iPhone and iPad, with the game's data inside (about 1.3 GB)
PvZ2-Reflourished-<game>-Darwin-<version>-Mac.dmg Mac, slim
PvZ2-Reflourished-<game>-Darwin-<version>-Mac-Full.dmg Mac, with the game's data inside
PvZ2-Reflourished-<game>-Darwin-<version>-Windows-Setup.exe Windows PCs, Intel/AMD and ARM (about 120 MB)
PvZ2-Reflourished-<game>-Darwin-<version>-Windows-x64.zip Windows, Intel/AMD, portable (no installer, no updates)
PvZ2-Reflourished-<game>-Darwin-<version>-Windows-ARM64.zip Windows, ARM (Snapdragon), portable

A slim app downloads the game's data (1.3 GB) the first time it opens and checks it, so keep it open on Wi-Fi until the game starts.

iPhone / iPad

iOS 15.5 or later.

Install the IPA with SideStore, AltStore, Sideloadly or LiveContainer.

AltStore / SideStore source - add https://raw.githubusercontent.com/oenderg/Reflourished-Darwin/main/altstore/source.json (Sources → +) and install the game from it; new releases then show up as updates.

Mac

Apple silicon, macOS 14 or later.

Open the DMG and drag the app onto Applications. The app is not notarized, so the first time macOS refuses to open it: click Done, then in System Settings → Privacy & Security click Open Anyway. After that the app updates itself.

Windows

Windows 10 or 11, 64-bit.

Run the setup. It is not signed, so Windows shows "Windows protected your PC" the first time: click More info, then Run anyway.

What the two screens look like

Windows protected your PC, with More info After More info: Run anyway

The first start downloads the game's data (1.3 GB). On Intel and AMD PCs it then prepares the game for that PC, once: about 2 minutes on a recent PC, longer on older ones, with a progress window. Later starts take seconds. After that the game updates itself.

Your saves live with the app (on the Mac, in ~/Library/Application Support/PvZ2 Reflourished; on Windows, in %APPDATA%\PvZ2 Reflourished). Uninstalling on Windows asks whether to delete them, with No selected.

Build it yourself

You need the PvZ2 Reflourished 1.5.0 APK from the mod's official download (the MEGA or Google Drive folder). You don't need the OBB that is next to it there: the build downloads the same file from a copy on GitHub by itself and checks it. To use your own copy instead, pass it with --obb (or the workflow's OBB link).

Option A - let GitHub build it (no Mac needed)

  1. Fork this repository.
  2. In your fork, open the Actions tab and enable workflows.
  3. Pick Build → Run workflow, paste a link to the APK (a direct link, Google Drive or MEGA), and start it.
  4. When it finishes (up to an hour), the apps are in your fork's Releases.

Option B - build it on your Mac

Needs Xcode (with its iOS platform) and about 8 GB of free space.

git clone https://github.com/oenderg/Reflourished-Darwin
cd Reflourished-Darwin
./build.sh --apk "PvZ2 Reflourished 1.5.0.apk" --slim

The results land in out/. Add --ios or --mac to build just one of them; leave out --slim for apps with the game's data inside (about 1.3 GB more).

Known issues

  • Tested on one iPhone so far.
  • Windows: tested on Windows 11 (an Intel desktop PC and an ARM virtual machine); Windows 10 should work but is untested.
  • Windows: the setup is not code-signed, so SmartScreen warns the first time (see Install).

How it works

The game's native libraries (libPVZ2, the mod's libRFLib and their helpers) are translated from Android's ELF format into Mach-O dylibs at build time, with the mod's 453 code hooks written straight into the converted code. A small host - built on Husk - provides what Android would have: the JNI calls the game makes, its file system, OpenGL ES through ANGLE over Metal, audio, touch and keyboard input, and the app's lifecycle.

On Windows the same host code runs without the Apple conversion step. ARM PCs run the game's ARM64 code directly, loaded from the APK at start-up. Intel and AMD PCs translate it to x86-64 on the first start with the ScarletNX recompiler and keep the result, and the game draws through ANGLE over Direct3D 11.

Folder What is in it
converter/ ELF → Mach-O conversion and the hook bake
runtime/ the host: Android and JNI environment, graphics, audio, input, iOS, Mac and Windows apps
data/ the mod's recorded hook table and the game version it matches
prebuilt/ ANGLE for iOS and the iOS Simulator (rebuild with REBUILD_ANGLE=1 ./build.sh …)
scripts/ downloads, the disk image, the AltStore source, the Mac test runner
docs/ how it works, testing, the game's internals, releasing

More in docs/ARCHITECTURE.md.

Contributing

Fixes and improvements are welcome. CONTRIBUTING.md has the build loop and what a good pull request shows; docs/TESTING.md how to test on a Mac without touching your own game; docs/GAME-NOTES.md what the game does that is not obvious. Coding agents start at AGENTS.md. Found a bug? Open an issue with the app's log.

Thanks

The PvZ2 Reflourished team for the mod, Husk for the translation layer this is built on, and ANGLE (WebKit and Chromium) for OpenGL ES on Metal.

About

PvZ2: Reflourished native port for iPhone, iPad, Mac and Windows

Topics

Resources

Contributing

Stars

82 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages