You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,30 @@ _Screenshot of the Build Phase can be found [here](Documentation/Images/BuildPha
135
135
_Tip:_ Add the `*.generated.swift`pattern to your `.gitignore`file to prevent unnecessary conflicts.
136
136
</details>
137
137
138
+
139
+
<details>
140
+
<summary><h3>Mint</h3></summary>
141
+
142
+
0. Add the [R.swift](https://github.com/mac-cain13/R.swift) library to your project
143
+
1. Add `mac-cain13/R.swift` to your [Mintfile](https://github.com/yonaskolb/Mint#mintfile) and run `mint bootstrap` to install this package without linking it globally (recommended)
144
+
2. In Xcode: Click on your project in the file list, choose your target under `TARGETS`, click the `Build Phases`tab and add a `New Run Script Phase`by clicking the little plus icon in the top left
145
+
3. Drag the new `Run Script` phase **above** the `Compile Sources` phase, expand it and paste the following script:
146
+
```bash
147
+
if mint list | grep -q 'R.swift'; then
148
+
mint run R.swiftt@v7.0.1 rswift generate "$SRCROOT/R.generated.swift"
149
+
else
150
+
echo "error: R.swift not installed; run 'mint bootstrap' to install"
151
+
return -1
152
+
fi
153
+
```
154
+
4. Add `$SRCROOT/R.generated.swift` to the "Output Files" of the Build Phase
155
+
5. Uncheck "Based on dependency analysis" so that R.swift is run on each build
156
+
6. Build your project, in Finder you will now see a `R.generated.swift` in the `$SRCROOT`-folder, drag the `R.generated.swift` files into your project and **uncheck** `Copy items if needed`
157
+
158
+
_Tip:_ Add the `*.generated.swift`pattern to your `.gitignore`file to prevent unnecessary conflicts.
0 commit comments