Skip to content

Commit 7a23955

Browse files
committedDec 13, 2023
Update README.md
1 parent a25618f commit 7a23955

File tree

2 files changed

+89
-4
lines changed

2 files changed

+89
-4
lines changed
 

‎README.md

+89-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Feel free to request features or suggestions for improvements.
66

77
[![Developer](https://img.shields.io/badge/Maintainer-ImaginativeShohag-green)](https://github.com/ImaginativeShohag)
88
[![Developer](https://img.shields.io/badge/-buy_me_a_coffee-gray?logo=buy-me-a-coffee)](https://www.buymeacoffee.com/ImShohag)
9+
[![Tuist badge](https://img.shields.io/badge/Powered%20by-Tuist-blue)](https://tuist.io)
910

1011
## What we have hare!
1112

@@ -32,11 +33,11 @@ A simple example to demonstrate separate views for iPhone and iPad. Users will s
3233
| <img src="images/bottom-nav.png" width=165/> | <img src="images/side-bar.png" width=250/> |
3334
| :-: | :-: |
3435

35-
### Component: `CoolProgress`
36+
### Component: `SuperProgress`
3637

3738
<img src="images/cool-progress.gif" width=250/>
3839

39-
### Component: `CoolToast`
40+
### Component: `SuperToast`
4041

4142
A cool "Android Toast" like implementation for SwiftUI.
4243

@@ -92,6 +93,90 @@ Total 3 playground related to date formatting. Inspired by [NSDateFormatter.com]
9293
- Resources
9394
- [Swift Macros: Extend Swift with New Kinds of Expressions](https://www.avanderlee.com/swift/macros/)
9495

96+
## Project Setup
97+
98+
This project is using [Tuist](https://tuist.io). To run the project we need some initial setup.
99+
100+
### Step 1: Install Tuist (One time setup)
101+
102+
Install Tuist using the following command:
103+
104+
```bash
105+
curl -Ls https://install.tuist.io | bash
106+
```
107+
108+
### Step 2: Fetch dependencies
109+
110+
We need to fetch the app dependencies. So use the following command to fetch the dependencies using Tuist.
111+
112+
```bash
113+
tuist fetch
114+
```
115+
116+
### Step 3: Generate the project
117+
118+
Finally, create the project file using the following command:
119+
120+
```bash
121+
tuist generate
122+
```
123+
124+
This will generate the project file and run the project in Xcode.
125+
126+
### Notes
127+
128+
- As we are using Tuist to manage our Xcode project, use the following command to open the Tuist manifest files in Xcode for editing:
129+
130+
```bash
131+
tuist edit
132+
```
133+
134+
- We have to run the `tuist fetch` every time we add or update dependency to our project.
135+
136+
- After changing branch we also need to run the `tuist generate` command to generate project files.
137+
138+
- Please don't use Xcode Source Control. ([Issue](https://github.com/tuist/tuist/issues/4630))
139+
140+
Please see the [Tuist documentation](https://docs.tuist.io/tutorial/get-started) for details.
141+
142+
## Project Map
143+
144+
![Project Map](graph.png)
145+
146+
# Tuist Cheat Sheet
147+
148+
## Access `Bundle`
149+
150+
**Note:** Let's assume our target name is `Core`.
151+
152+
```swift
153+
/// Get current targets `Bundle` instance.
154+
let bundle = Bundle.module
155+
156+
/// Get a specific targets `Bundle` instance.
157+
let bundle = CoreResources.bundle
158+
// Equivalent old way:
159+
let bundle = Bundle(identifier: "com.apple.art4.Core")
160+
```
161+
162+
## Access Assets
163+
164+
**Note:** Let's assume our target name is `Core`.
165+
166+
```swift
167+
// Old way
168+
let color: Color = Color("example-color")
169+
170+
// New way
171+
let color: Color = CoreAsset.exampleColor.swiftUIColor
172+
173+
// Old way
174+
let image: UIImage = UIImage("example-image")! // The asset must be in the current target :(
175+
176+
// New way
177+
let image: UIImage = CoreAsset.exampleImage.image // Access from any target :)
178+
```
179+
95180
## TODO
96181

97182
- [ ] MetricKit crash report example (WIP)
@@ -105,9 +190,9 @@ Total 3 playground related to date formatting. Inspired by [NSDateFormatter.com]
105190
- [ ] CMS Module
106191
- [ ] System UI Components Collection
107192
- [ ] [https://developer.apple.com/documentation/swiftui/grid](Grid)
108-
- [ ] Navigation system update
193+
- [x] Navigation system update
109194
- [ ] SF Symbol animation ((How to animate SF Symbols)[https://www.hackingwithswift.com/quick-start/swiftui/how-to-animate-sf-symbols])
110-
- [ ] Migrate to Tuist
195+
- [x] Migrate to Tuist
111196

112197
## Extensions
113198

‎graph.png

74.5 KB
Loading

0 commit comments

Comments
 (0)