Skip to content

Commit 7152055

Browse files
committed
docs: add Git LFS pull and Secrets.xcconfig steps to development setup guide
1 parent ae5a63a commit 7152055

File tree

2 files changed

+36
-28
lines changed

2 files changed

+36
-28
lines changed

docs/development/setup.mdx

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,39 @@ description: Clone, build, and run TablePro locally with Xcode 15+, SwiftLint, a
2222
| **SwiftLint** | Code linting |
2323
| **SwiftFormat** | Code formatting |
2424
| **Homebrew** | Package management |
25+
| **Git LFS** | Pulls pre-built native libraries from `Libs/` |
2526

2627
## Getting Started
2728

28-
### Step 1: Clone the Repository
29+
### Step 1: Clone and Bootstrap
2930

3031
```bash
3132
git clone https://github.com/datlechin/tablepro.git
3233
cd tablepro
33-
```
3434

35-
### Step 2: Install Development Tools
35+
# Pull native libraries (stored in Git LFS)
36+
brew install git-lfs
37+
git lfs install
38+
git lfs pull
3639

37-
```bash
38-
# Using Homebrew
40+
# Create required build config (empty is fine for development)
41+
touch Secrets.xcconfig
42+
43+
# Install linting/formatting tools
3944
brew install swiftlint swiftformat
4045
```
4146

42-
### Step 3: Open in Xcode
47+
<Warning>
48+
Skipping `git lfs pull` leaves `Libs/` with pointer files instead of binaries, causing linker errors.
49+
</Warning>
50+
51+
### Step 2: Open in Xcode
4352

4453
```bash
4554
open TablePro.xcodeproj
4655
```
4756

48-
Or open Xcode manually: **File** > **Open** > navigate to `TablePro.xcodeproj`.
49-
50-
### Step 4: Build and Run
57+
### Step 3: Build and Run
5158

5259
1. Select the **TablePro** scheme
5360
2. Select **My Mac** as the destination
@@ -308,13 +315,9 @@ logger.error("Failed to connect: \(error.localizedDescription)")
308315
3. Fix the issue or disable the rule if appropriate
309316
4. Run `swiftlint --fix` for auto-fixable issues
310317

311-
### Missing Libraries
312-
313-
If native libraries are missing:
318+
### Missing Libraries or Secrets.xcconfig
314319

315-
1. Check the `Libs/` directory
316-
2. Verify `libmariadb_universal.a` exists
317-
3. Run `scripts/build-release.sh` to prepare libraries
320+
Run `git lfs pull` and `touch Secrets.xcconfig` at the repo root. See [Step 1](#step-1-clone-and-bootstrap).
318321

319322
## Next Steps
320323

docs/vi/development/setup.mdx

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,39 @@ description: Clone, build và chạy TablePro cục bộ với Xcode 15+, SwiftL
2222
| **SwiftLint** | Code linting |
2323
| **SwiftFormat** | Code formatting |
2424
| **Homebrew** | Quản lý package |
25+
| **Git LFS** | Pull thư viện native từ `Libs/` |
2526

2627
## Bắt đầu
2728

28-
### Bước 1: Clone Repository
29+
### Bước 1: Clone và Bootstrap
2930

3031
```bash
3132
git clone https://github.com/datlechin/tablepro.git
3233
cd tablepro
33-
```
3434

35-
### Bước 2: Cài đặt Development Tools
35+
# Pull thư viện native (lưu trong Git LFS)
36+
brew install git-lfs
37+
git lfs install
38+
git lfs pull
3639

37-
```bash
38-
# Dùng Homebrew
40+
# Tạo file config bắt buộc (file trống đủ cho phát triển)
41+
touch Secrets.xcconfig
42+
43+
# Cài đặt công cụ lint/format
3944
brew install swiftlint swiftformat
4045
```
4146

42-
### Bước 3: Mở trong Xcode
47+
<Warning>
48+
Bỏ qua `git lfs pull` sẽ khiến `Libs/` chứa file con trỏ thay vì binary, gây lỗi linker.
49+
</Warning>
50+
51+
### Bước 2: Mở trong Xcode
4352

4453
```bash
4554
open TablePro.xcodeproj
4655
```
4756

48-
Hoặc mở Xcode thủ công: **File** > **Open** > điều hướng đến `TablePro.xcodeproj`.
49-
50-
### Bước 4: Build và Run
57+
### Bước 3: Build và Run
5158

5259
1. Chọn scheme **TablePro**
5360
2. Chọn **My Mac** làm destination
@@ -308,11 +315,9 @@ logger.error("Failed to connect: \(error.localizedDescription)")
308315
3. Sửa vấn đề hoặc disable rule nếu phù hợp
309316
4. Chạy `swiftlint --fix` cho vấn đề auto-fix được
310317

311-
### Thư viện bị thiếu
318+
### Thiếu thư viện hoặc Secrets.xcconfig
312319

313-
1. Kiểm tra thư mục `Libs/`
314-
2. Xác minh `libmariadb_universal.a` tồn tại
315-
3. Chạy `scripts/build-release.sh` để chuẩn bị thư viện
320+
Chạy `git lfs pull``touch Secrets.xcconfig` tại thư mục gốc. Xem [Bước 1](#bước-1-clone-và-bootstrap).
316321

317322
## Bước tiếp theo
318323

0 commit comments

Comments
 (0)