C and C++ compiler for iPhone and iPad

Use Kodo Editor to compile and run C or C++ exercises offline on iPhone and iPad. The app bundles Clang and runs the compiled WebAssembly inside the device. Your compiler output stays in the built-in terminal.

Download Kodo on the App Store

By Theodor Tiberius StefanUpdated

How to get started

  1. Create a local project and add main.cpp for C++ or main.c for C.
  2. Try the C++ example below. Compare its output with the expected result: 3.
  3. Run the program from the editor and read the compiler diagnostics or program output in the terminal.
  4. Change one number or remove a bracket on purpose. Rebuild and compare the results.
  5. Before submitting coursework, run the same source against the instructor’s required toolchain and tests.
#include <iostream>
#include <vector>

int main() {
    std::vector<int> scores{1, 2, 3};
    std::cout << scores.size() << "\n";
}
Program output in Kodo’s local terminal on iPad
The integrated terminal, shown in the App Store screenshot.

Limits to know

The current toolchain targets C11 and C++17. Verify libraries and project layouts individually. Plan to use SSH for desktop-specific APIs, native binaries or build systems your course requires.

Frequently asked questions

Does it need internet to compile?

No. Kodo includes the compiler on the device. [source: App Store]

How does compilation work on iOS?

The bundled Clang toolchain compiles the source for WebAssembly, and an in-app runtime executes the output. [source: App Store]

Can I use the C++ standard library?

Start with standard headers such as iostream and vector. Test the exact headers and features your project requires.

What if I need the exact lab compiler?

SSH to the machine provided by your course if access is offered and run its compiler there.

Related guides

Download Kodo on the App Store Read the Kodo guide

App Store release 5.6 ·