|
1
|
# Apple Platform Overlay |
|
2
|
|
|
3
|
This directory contains hand-authored files for the Apple platform targets |
|
4
|
(tvOS, watchOS, visionOS) and the Tuist project configuration. It lives |
|
5
|
**outside** `gen/apple/` so it survives `rm -rf gen/apple && cargo tauri ios init`. |
|
6
|
|
|
7
|
## Directory Layout |
|
8
|
|
|
9
|
``` |
|
10
|
apple/ |
|
11
|
├── bootstrap.sh ← copies everything into gen/apple/ |
|
12
|
├── README.md ← you are here |
|
13
|
├── Project.swift ← Tuist project manifest (source of truth) |
|
14
|
├── Tuist.swift ← Tuist configuration |
|
15
|
├── mise.toml ← pins the Tuist version |
|
16
|
├── apple.gitignore ← becomes gen/apple/.gitignore |
|
17
|
├── tauri-app_tvOS/ |
|
18
|
│ ├── App.swift |
|
19
|
│ └── Info.plist |
|
20
|
├── tauri-app_watchOS/ |
|
21
|
│ ├── App.swift |
|
22
|
│ ├── Info.plist |
|
23
|
│ └── Assets.xcassets/ ← watchOS-specific app icon |
|
24
|
└── tauri-app_visionOS/ |
|
25
|
├── App.swift |
|
26
|
└── Info.plist |
|
27
|
``` |
|
28
|
|
|
29
|
## Workflow |
|
30
|
|
|
31
|
The full setup from a clean state: |
|
32
|
|
|
33
|
```sh |
|
34
|
# 1. Tauri scaffolds gen/apple/ (Sources, Assets, iOS target, etc.) |
|
35
|
cargo tauri ios init |
|
36
|
|
|
37
|
# 2. Overlay our Apple platform targets + Tuist config into gen/apple/ |
|
38
|
./src-tauri/apple/bootstrap.sh |
|
39
|
|
|
40
|
# 3. Install pinned Tuist via mise |
|
41
|
cd src-tauri/gen/apple |
|
42
|
mise install |
|
43
|
|
|
44
|
# 4. Generate the Xcode project from Project.swift |
|
45
|
tuist generate --no-open |
|
46
|
``` |
|
47
|
|
|
48
|
After this, open `gen/apple/tauri-app.xcworkspace` in Xcode. |
|
49
|
|
|
50
|
## Idempotency |
|
51
|
|
|
52
|
This workflow is idempotent. You can run it any number of times: |
|
53
|
|
|
54
|
```sh |
|
55
|
rm -rf src-tauri/gen/apple |
|
56
|
cargo tauri ios init |
|
57
|
./src-tauri/apple/bootstrap.sh |
|
58
|
cd src-tauri/gen/apple && tuist generate --no-open |
|
59
|
``` |
|
60
|
|
|
61
|
`gen/apple/` is fully git-ignored. The source of truth is: |
|
62
|
|
|
63
|
| What | Where | |
|
64
|
|---|---| |
|
65
|
| iOS scaffold (Sources, assets, Info.plist) | `cargo tauri ios init` (from `tauri.conf.json`) | |
|
66
|
| Tuist manifest + Apple platform targets | `src-tauri/apple/` (this directory) | |
|
67
|
| Xcode project | `tuist generate` (from `Project.swift`) | |
|
68
|
|
|
69
|
## Editing |
|
70
|
|
|
71
|
**To change tvOS / watchOS / visionOS targets or Tuist config:** |
|
72
|
edit the files in this `apple/` directory, then re-run `bootstrap.sh`. |
|
73
|
|
|
74
|
**To change the iOS target or Tauri build settings:** |
|
75
|
edit `tauri.conf.json` and re-run `cargo tauri ios init` + `bootstrap.sh`. |
|
76
|
|
|
77
|
**Never edit files directly inside `gen/apple/`** — they will be overwritten |
|
78
|
on the next scaffold or bootstrap. |