# Factorio on iPhone Play your own copy of **Factorio** on your iPhone. You build the app on your Mac from the Factorio you already own on Steam, and install it on your phone with a cable. This project contains **no game files**. Everything comes from your own installed copy. It is an unofficial fan project, not made or supported by Wube Software. --- ## What you need - A **Mac** (tested on Apple Silicon). - **Factorio 2.0.77 for Mac, bought on Steam** and installed. - An **iPhone** (tested on iPhone 15 Pro) and its **cable**. - A free or paid **Apple account**. - About **3 GB** of free space on the phone. --- ## Install, step by step ### Step 1: Install Xcode 1. Open the **App Store** on your Mac, search for **Xcode** and install it (it is large and takes a while). 2. Open Xcode once. When it asks which platforms to install, choose **iOS**. ### Step 2: Sign in to Xcode with your Apple account 1. In Xcode open **Xcode → Settings → Accounts**. 2. Click **+**, choose **Apple ID** and sign in. ### Step 3: Connect your iPhone 1. Plug the iPhone into the Mac, unlock it, and tap **Trust**. 2. On the iPhone open **Settings → Privacy & Security → Developer Mode**, turn it **on**, and let the phone restart. (If you don't see **Developer Mode** yet, do Step 4 first and come back.) ### Step 4: Let Xcode set up signing (one time only) Your iPhone only runs apps signed with your Apple account. A tiny empty Xcode project sets this up once: 1. In Xcode choose **File → New → Project… → iOS → App → Next**. 2. Fill in: - **Product Name:** `factorio` - **Team:** your Apple account - **Organization Identifier:** `com.` followed by your name, for example `com.alexsmith` 3. Click **Next** and save it anywhere. 4. At the top of the Xcode window, pick your **iPhone** as the run destination and press **▶ (Run)**. A blank white app appears on the phone; that means it worked. If the phone says **Untrusted Developer**, open **Settings → General → VPN & Device Management**, tap your account and choose **Trust**, then press **▶** again. You can now close Xcode and delete that project. The real Factorio app will replace the blank one. ### Step 5: Download this project Open the **Terminal** app on your Mac and run: ```sh git clone https://git.entityseven.com/entityseven/factorio-ios.git cd factorio-ios ``` ### Step 6: Install Factorio on the phone Keep the iPhone **plugged in and unlocked**, then run: ```sh ./install.sh ``` This builds the app, installs it, and copies the game data (about 1.5 GB) to the phone. It takes a few minutes. When it says **Done**, the **Factorio** icon is on your home screen. --- ## Playing - **Tap** = left click. **Hold** = right click (hold on ore or trees to mine them). - **Two-finger drag** = zoom and scroll. - **Left stick** = walk. Buttons **E Q R F M T**, **Esc**, **Tab**, **⇧**, **Ctrl** = the same keys as on a computer. - **⌨︎** opens the keyboard. **◐** hides the on-screen buttons. - A Bluetooth keyboard works too. The text is small at first: in the game open **Settings → Interface** and set **UI scale** to about **175–200 %**. The game takes about 15 seconds to start. Your saves stay on the phone, also when you update the app. All controls: [docs/controls.md](docs/controls.md). --- ## Updating ```sh cd factorio-ios git pull ./install.sh ``` --- ## Problems? | What you see | What to do | | --- | --- | | `Factorio not found` | Install Factorio from Steam on this Mac and let it finish downloading. | | `wrong Factorio version` | This version of the port needs Factorio **2.0.77**. In Steam, open the game's **Properties** and keep it on that version. | | `no provisioning profile found` | Do **Step 4** again. The Xcode project must be named `factorio`. | | `no iPhone found` | Plug in the phone, unlock it, tap **Trust**, and check **Developer Mode** (Step 3). | | `Xcode is not installed` / `iOS platform is missing` | Do **Step 1**. | | `device was not unlocked` | Unlock the phone and run `./install.sh` again. | | App says **Game data missing** | Run `./install.sh` again with the phone unlocked. | | App stops opening after 7 days | Free Apple accounts sign apps for 7 days. Run `./install.sh` again; your saves are kept. | | The game closes while playing | Run `python3 tools/build_native.py --no-build --launch` and send the output as a bug report. | --- ## More information - [docs/building.md](docs/building.md): advanced build options and troubleshooting. - [docs/native-port.md](docs/native-port.md): how the port works. - [docs/research/](docs/research/static-translation.md): earlier research (ARM64 → WASM translation). **Third-party software:** [Wuffs](https://github.com/google/wuffs) (Apache-2.0) is downloaded during the build to decode PNG images. Factorio itself uses [SDL](https://github.com/libsdl-org/SDL) (zlib). Factorio is a trademark of Wube Software Ltd.; all game code and assets belong to them.