Repository navigation
Expand file tree
/
Copy pathproject.yml
More file actions
180 lines (176 loc) · 8.77 KB
/
Copy pathproject.yml
File metadata and controls
180 lines (176 loc) · 8.77 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: VietTelex
options:
bundleIdPrefix: com.viettelex
deploymentTarget:
macOS: "13.0"
createIntermediateGroups: true
packages:
TelexCore:
path: TelexCore
schemes:
VietTelex:
build:
targets:
VietTelex: all
test:
targets:
- VietTelexTests
targets:
VietTelexTests:
type: bundle.unit-test
platform: macOS
sources:
- path: AppTests
dependencies:
- target: VietTelex
settings:
base:
# Hosted tests: @testable import VietTelex needs the app module loaded.
TEST_HOST: $(BUILT_PRODUCTS_DIR)/VietTelex.app/Contents/MacOS/VietTelexDev
BUNDLE_LOADER: $(TEST_HOST)
SWIFT_VERSION: "5.0"
GENERATE_INFOPLIST_FILE: "YES"
configs:
Release:
TEST_HOST: $(BUILT_PRODUCTS_DIR)/VietTelex.app/Contents/MacOS/VietTelex
VietTelex:
type: application
platform: macOS
sources:
- path: App/Sources
# Logic thuần DÙNG CHUNG với iOS (cùng file, không bản sao — sửa một chỗ là cả hai
# nền tảng thấy; fixture/test ở iOS/KeyboardTests + AppTests):
# • đồng bộ iCloud LWW (cùng định dạng KVS với app iOS) — ICloudSync.swift;
# • công cụ văn bản HOA/thường/xoá dấu + Thêm dấu (Viterbi trên vnlexicon + bigram vnlm.bin)
# — TextActions.swift. Dữ liệu Thêm dấu chỉ được nạp trong process con
# `VietTelex --add-tones`, không bao giờ trong process IME.
- path: iOS/App/Backup/SyncCore.swift
- path: iOS/Keyboard/TextTools.s
8000
wift
# • Công cụ → Dịch (macOS 26+, TranslateAction.swift): chiều dịch + nhận ra tiếng Việt
# không cần NaturalLanguage, ngôn ngữ đích `translateTarget` — cùng luật với iOS.
- path: iOS/Keyboard/Translate.swift
# phần gọi Apple Translation (iOS: framework VTTranslate nạp lười; macOS: biên dịch thẳng)
- path: iOS/VTTranslate/TranslateEngine.swift
- path: iOS/Shared/TranslatePrefs.swift
# L("…") của TextTools (giao diện tiếng Anh, b8da26e) — chỉ Foundation.
- path: iOS/Shared/L10n.swift
# L10n đọc App Group / ngôn ngữ mặc định qua AppFlavor (giá trị riêng của từng app dựng từ mã iOS).
- path: iOS/Shared/AppFlavor.swift
- path: iOS/Keyboard/AddTones.swift
# • cặp chọn tay (Scripts/curated-pairs.txt) — Thêm dấu dùng chung với iOS/Android/Windows.
- path: iOS/Keyboard/CuratedPairs.swift
- path: iOS/Keyboard/SwipeLexicon.swift
- path: iOS/Keyboard/SwipeEnglish.swift
- path: iOS/Keyboard/VNSuggest.swift
- path: iOS/Keyboard/VNLexicon2.swift
- path: iOS/Keyboard/SyllableLM.swift
# • kết quả phép tính "…=" (MathHint.swift) — cùng quy tắc chip iOS/Android.
- path: iOS/Keyboard/MathResults.swift
- path: iOS/Keyboard/NumberChips.swift
# • gợi ý sửa lỗi gõ sai (CaretSuggestions.swift) — cùng logic tự sửa iOS/Android
# (AutoCorrect + AdjacentKeyFixer, phần UIKit/EngineBridge nằm trong #if) + từ chat seed.
- path: iOS/Keyboard/AutoCorrect.swift
- path: iOS/Keyboard/AdjacentKeyFixer.swift
- path: iOS/Keyboard/SeedData.swift
# • gợi ý từ cạnh con trỏ (WordPrediction.swift) — cùng xếp hạng thanh gợi ý iOS
# (SuggestRank inline/từ kế tiếp, DisplayCase, lọc nhạy cảm); dữ liệu là
# vnlexicon.bin / vnlm.bin / enlexicon.bin + SeedData đã có sẵn.
- path: iOS/Keyboard/SuggestionSupport.swift
# • "Học từ bạn gõ" (LearnedModel.swift): bảng gọn + codec VTL2 của UserLangModel iOS
# (không kéo phần di trú/sao lưu/từ điển cá nhân của UserLangModel.swift).
- path: iOS/Keyboard/UserLMTables.swift
- path: iOS/Keyboard/DisplayCase.swift
- path: iOS/Keyboard/SensitiveWords.swift
- path: iOS/Keyboard/Resources/vnlexicon.bin
buildPhase: resources
- path: iOS/Keyboard/Resources/vnlm.bin
buildPhase: resources
- path: iOS/Keyboard/Resources/enlexicon.bin
buildPhase: resources
# App icon: AppIcon.icns assembled from the palette-quantized PNG slices in
# Assets.xcassets by Scripts/make_appicon.py (PNG chunks, NOT iconutil, NOT
# actool). actool re-encoded the 8-bit palette PNGs to 32-bit and emitted a
# second AppIcon.icns next to Assets.car: 360 KB car + 36 KB icns → 246 KB,
# pixel-identical slices (measured 25/09/2026).
- path: App/Resources/AppIcon.icns
buildPhase: resources
- path: App/Resources/MenuIcon.pdf
buildPhase: resources
# Bộ icon user chọn được (tab Thử nghiệm): MenuIcon.pdf là file ACTIVE mà
# Info.plist trỏ tới; 1 = bản gốc Vᴛ (để quay lại), 2 = sao 5 cánh.
# MenuIconSwitcher ghi đè file active theo lựa chọn — xem file đó cho rủi ro
# seal đã chấp nhận (maintainer 17/08/2026).
- path: App/Resources/MenuIcon1.pdf
buildPhase: resources
- path: App/Resources/MenuIcon2.pdf
buildPhase: resources
- path: App/Resources/MenuIcon3.pdf
buildPhase: resources
- path: App/Resources/PrivacyInfo.xcprivacy
buildPhase: resources
# Built-in per-app typing rules — repo-root data file (see its header);
# bundled so AppState loads defaults from data, attached to releases.
- path: typing-modes.yml
buildPhase: resources
- path: App/Resources/en.lproj/InfoPlist.strings
buildPhase: resources
- path: App/Resources/en.lproj/Localizable.strings
buildPhase: resources
- path: App/Resources/vi.lproj/InfoPlist.strings
buildPhase: resources
- path: App/Resources/vi.lproj/Localizable.strings
buildPhase: resources
dependencies:
- package: TelexCore
product: TelexCore
- sdk: InputMethodKit.framework
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.viettelex.inputmethod.telex
PRODUCT_NAME: VietTelex
PRODUCT_MODULE_NAME: VietTelex
INFOPLIST_FILE: App/Resources/Info.plist
# .strings ship as UTF-8, not Xcode's default UTF-16 (Vietnamese text is
# mostly 1-byte ASCII + 2-byte UTF-8: 52 KB → ~29 KB for vi, measured 25/09).
STRINGS_FILE_OUTPUT_ENCODING: UTF-8
# xcodebuild ad-hoc signs; Scripts/notarize-install.sh re-signs with
# Developer ID + hardened runtime, then notarizes + staples. macOS 26
# requires input methods to be NOTARIZED to register — verified with a
# notarized third-party input method as control (registered) vs our
# unnotarized builds (never
# did). Uses VietTelex.entitlements (sandbox off, NO get-task-allow —
# get-task-allow is rejected by notarization).
CODE_SIGN_ENTITLEMENTS: App/Resources/VietTelex.entitlements
CODE_SIGN_IDENTITY: "-"
CODE_SIGNING_ALLOWED: "YES"
MARKETING_VERSION: "0.1"
CURRENT_PROJECT_VERSION: "1"
# App uses Swift 5 language mode (AppKit/IMK main-thread singletons).
# TelexCore remains Swift 6 strict-concurrency clean.
SWIFT_VERSION: "5.0"
ENABLE_HARDENED_RUNTIME: "YES"
# Translation (Công cụ → Dịch) chỉ có từ macOS 15 (dùng từ 26): weak-link để bản
# build vẫn khởi động trên macOS 13/14 — thiếu framework thì nút Dịch đã bị ẩn.
OTHER_LDFLAGS: ["$(inherited)", "-weak_framework", "Translation", "-weak_framework", "_Translation_SwiftUI"]
configs:
Debug:
# Keep the installed Dev input method distinct from the signed stable build.
PRODUCT_BUNDLE_IDENTIFIER: com.viettelex.inputmethod.viettelexdev
EXECUTABLE_NAME: VietTelexDev
INFOPLIST_FILE: App/Resources/Debug-Info.plist
Release:
# Size diet (Release ONLY — Debug keeps symbols so VietTelexTests'
# BUNDLE_LOADER/@testable linking still works). Measured before: each
# arch slice was ~950KB of which only ~380KB was __TEXT — the rest
# mostly a 3.4k-entry symbol table
3A11
nothing consumes (crash reports
# symbolicate via the dSYM). ObjC runtime metadata (NSClassFromString
# for InputMethodServerControllerClass) lives in __DATA and is NOT
# affected by strip.
DEPLOYMENT_POSTPROCESSING: "YES"
STRIP_INSTALLED_PRODUCT: "YES"
STRIP_STYLE: "all"
# App-side code is I/O-bound (XPC/event round trips), so trade a few
# percent of straight-line speed for size. TelexCore (the µs hot path)
# builds as a package with its own -O and is untouched.
SWIFT_OPTIMIZATION_LEVEL: "-Osize"
LLVM_LTO: "YES_THIN"