A Rubik's cube for iPhone, iPad, and Mac — play with a real-feeling 3D cube, scramble it, paint any position, and watch it get solved, either the fast way or the way humans learn.
- Play — drag stickers to turn layers (middle slices included, with M/E/S notation), drag empty space or use two fingers to rotate the whole cube, pinch to zoom. Undo/redo, move history, sounds and haptics.
- Scramble — WCA-style random-state scrambles, animated; review, replay, or copy the scramble afterwards.
- Solve — three methods, selectable in Settings:
- Fast: Kociemba two-phase algorithm, ~20-move solutions found in milliseconds.
- Optimal: Korf-style search over pattern databases — a provably shortest solution, typically in seconds to minutes on a Mac (one-time table bake required).
- Beginner: the classic layer-by-layer method in seven named stages (~150–250 moves), presented step by step so you can follow along and learn.
- Customize — paint any cube sticker by sticker with live legality checking that explains exactly why an impossible cube is impossible ("a corner is twisted", "two pieces are swapped", …). Custom color schemes with presets and a live preview.
- Timer — scramble, solve by hand, and the clock stops itself the moment the cube is solved. Personal bests and WCA-style averages in the Stats tab.
- Native everywhere — SwiftUI + RealityKit with the Liquid Glass design language, one codebase across iOS, iPadOS, and macOS 26+.
Requirements: Xcode 26+, iOS/macOS 26 SDKs.
open cubeone.xcodeproj # scheme: cubeone — run on My Mac or any iPhone/iPad simulatorThe cube engine is a standalone Swift package:
cd CubeKit
swift test # 53 tests; use -c release for performance checksFirst launch generates the solver's lookup tables (~0.2 s in release builds) and caches them in Application Support.
The project is split into a pure-logic package and a thin presentation layer:
- CubeKit — the cube model (cubie-level state, sticker validation), a Kociemba two-phase solver, a staged beginner solver, scrambling, and slice-move algebra. No UI imports; fully unit-tested.
- cube/ (app) — RealityKit scene with per-cubelet entities and animated layer turns, gesture resolution (screen-space drag → the turn you meant), Liquid Glass UI, settings/stats persistence.
See docs/ARCHITECTURE.md for the interesting parts: how solver coordinates and pruning tables work, how the beginner solver proves each stage correct, and the fixed-center trick that makes true middle-slice animation possible.
The app was built in reviewed milestones; each pull request documents the design decisions of its slice of the app, from the cube model and solvers through gestures, navigation, the optimal solver, and polish.
Cube One is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License v3.0 (or any later version). See LICENSE for the full text.
Copyright © 2026 cypherair.
