Skip to content

Commit 03f38dc

Browse files
committed
Document how to opt-out of Macros
1 parent c015244 commit 03f38dc

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ To keep TranslateKit lightweight while providing comprehensive coverage, the 2,0
7575

7676
With this modular approach, TranslateKit remains lightweight, adding only ~1MB to your app, making it suitable for any project – big or small.
7777

78-
7978
## Swift Package Usage
8079

8180
For Swift packages, use `#tkm` instead of `#tk` to reference the correct String Catalog file:
@@ -105,10 +104,16 @@ struct FormValidator {
105104

106105
Common reasons to localize Swift packages are that they may contain UI elements (e.g. modularized apps) or that they might provide error descriptions, which should be localized in most cases.
107106

108-
## Troubleshooting Macros
107+
## Solving Macro Trust Issues in Xcode Cloud
109108

110109
If you're using Xcode Cloud or experiencing issues with macro trust, check out our guide [Solving Swift Macro Trust Issues in Xcode Cloud Builds](https://www.fline.dev/solving-swift-macro-trust-issues-in-xcode-cloud-builds/). This article explains how to properly configure your build settings when CI systems don't automatically trust macro packages.
111110

111+
## Using TranslateKit without Macros
112+
113+
If you don't want to use the `tk` macro but still profit from the community-driven common strings in your app, you can also opt for one of the `Lite` targets instead of the regular ones. For example, instead of adding and importing the `TranslateKit` target to your app, you can instead add & import `TranslateKitLite`. For category-specific variants, instead of something like `TranslateKitGames`, use `TranslateKitGamesLite`.
114+
115+
The `Lite` variants of the targets ensure that Xcode (and CI workflows) won't ask you to "Trust & Enable" macros in TranslateKit. But they also lack the added context you get when using `#tk` macro. We include these macros by default because we recommend everyone using them, but the `Lite` targets give you a way to opt-out when needed.
116+
112117
## Contributing
113118

114119
Contributions – especially additions and corrections – are welcome!

0 commit comments

Comments
 (0)