summaryrefslogtreecommitdiff
path: root/makima/ios/docs/DEVELOPMENT.md
blob: f58a218989c96ac7c9a3d7cb510de748e9ac004f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Makima iOS — Development

## Prerequisites

- macOS 14+ with Xcode 16+
- Homebrew
- `xcodegen` (auto-installed by `make bootstrap`)
- Optional: `xcbeautify` for nicer build logs (`brew install xcbeautify`)
- Optional: `swift-format` for linting (`brew install swift-format`)

## Source of truth

`project.yml` is the source of truth. `Makima.xcodeproj` is generated. **Do not commit `Makima.xcodeproj/`.** If you need to hand-tweak build settings, edit `project.yml` and re-run `make xcgen`.

## Running

```bash
make ios-sim-fast     # simulator build
make ios-device-fast  # device build (needs signing team set via env or project.yml)
make test             # unit tests on simulator
```

First device build: open `Makima.xcodeproj` in Xcode, select the `Makima` target, set your Signing Team under "Signing & Capabilities". That value is only local to Xcode's derived config.

## Folder layout

```
ios/
  project.yml                 # XcodeGen source
  Makefile                    # build shortcuts
  Sources/Makima/
    App/                      # entry point, Info.plist
    Design/                   # Palette, Typography, shared components
    Net/                      # APIClient, WebSocketClient, AuthStore (M2+)
    Stores/                   # @Observable stores (M3+)
    Features/                 # screen-level views
    Models/                   # Codable types for the Makima API
    Markdown/                 # custom markdown + code block rendering (M5)
    Resources/
      Assets.xcassets/        # app icon, colors
      Logo/                   # copied from frontend/public/logo
  Tests/MakimaTests/
  docs/
```

## Server config during development

Default server URL is `https://makima.jp`. For local dev against a self-hosted makima:

1. Onboarding → Server URL → enter e.g. `http://<host>:8080`
2. Provide an API key created via `POST /api/v1/auth/api-keys` on that server.

`NSAllowsArbitraryLoads` is disabled; for plain-HTTP dev servers you must either run behind TLS or add an ATS exception for your dev host via project.yml's `Info.plist.properties`.

## CI

GitHub Actions workflow at `.github/workflows/ios-ci.yml` runs `make test` on macOS-14 runners for every PR touching `makima/ios/**`.

## Release (v1)

TestFlight release lane is defined in `docs/RELEASING.md` (to be written at M8).