Skip to content

Commit 43e07f5

Browse files
committed
docs(xcode): 更新多语言 README 文档
补充 podfile 和 podInstall 配置项的使用说明(en/zh-CN/zh-TW/ja/ko)。
1 parent 67766e7 commit 43e07f5

5 files changed

Lines changed: 230 additions & 10 deletions

File tree

README.ja.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Unity iOS ビルド後に Xcode プロジェクトを自動設定するエディ
2929
- **ビルドプロパティ** — Build Settings の設定・追加・削除(`ENABLE_BITCODE``GCC_ENABLE_OBJC_EXCEPTIONS` など)
3030
- **Capabilities** — アプリ内課金、Game Center、プッシュ通知、Sign In with Apple、バックグラウンドモード、iCloud、App Groups、Associated Domains、Keychain Sharing、HealthKit、Siri、Personal VPN、Data Protection
3131
- **ローカライズ**`.lproj/InfoPlist.strings` の自動生成、アプリ名の多言語対応
32-
- **CocoaPods** — Podfile デフォルトソースの置き換え、設定による pod 依存関係の注入
32+
- **CocoaPods** — Podfile デフォルトソースの置き換え、設定による pod 依存関係の注入`pod install` の自動実行
3333
- **XcScheme** — 環境変数と起動引数の注入
3434
- **ファイル/フォルダ** — Xcode プロジェクトへの自動コピーとコンパイル追加、`.framework`/`.bundle` の自動認識
3535
- **コンパイルフラグ** — 特定のソースファイルにコンパイルオプションを設定
@@ -84,6 +84,8 @@ https://github.com/gameframex/com.gameframex.unity.xcode.git
8484
"environmentVariables": {},
8585
"launcherArgs": [],
8686
"podSource": [],
87+
"podfile": "",
88+
"podInstall": true,
8789
"localizations": [],
8890
"capabilities": {},
8991
"unityFramework": {},
@@ -99,6 +101,8 @@ https://github.com/gameframex/com.gameframex.unity.xcode.git
99101
| `environmentVariables` | object | XcScheme 環境変数、キーと値はともに文字列 |
100102
| `launcherArgs` | string[] | XcScheme 起動引数リスト |
101103
| `podSource` | string[] | CocoaPods ソース URL リスト、Podfile デフォルトソースを置き換え |
104+
| `podfile` | string | カスタム Podfile のパス、ビルド出力にコピー(`pods` より優先) |
105+
| `podInstall` | bool | Podfile 処理後に `pod install` を自動実行(デフォルト:`true`|
102106
| `localizations` | array | ローカライズ設定(下記参照) |
103107
| `capabilities` | object | iOS アプリ機能設定(下記参照) |
104108
| `unityFramework` | object | UnityFramework ターゲット設定 |
@@ -384,7 +388,33 @@ Unity-iPhone(メイン)ターゲットにのみ適用されます。有効
384388

385389
- Key = pod 名、Value = バージョン制約
386390
- 値が空 → `pod 'Name'`、値が非空 → `pod 'Name', 'Value'`
387-
- `pod install` は自動実行されません。手動または CI で実行してください
391+
392+
### podfile — カスタム Podfile
393+
394+
`pods` で個別に依存関係を注入する代わりに、完全な Podfile を指定することもできます。設定時は `pods` より優先され、ファイルがビルド出力に直接コピーされた後、`podSource` のソース URL が適用されます。
395+
396+
```json
397+
{
398+
"podfile": "XcodePodfile/Podfile"
399+
}
400+
```
401+
402+
- 相対パス(Unity プロジェクトルート、`Assets/` と同階層からの相対)と絶対パスをサポート
403+
- ファイルが存在しない場合は警告を出力し、`pods` 設定パスにフォールバック
404+
405+
### podInstall — pod install の自動実行
406+
407+
Podfile 処理後に `pod install` を自動的に実行するかどうかを制御します。システムの `PATH``pod` CLI が必要です。
408+
409+
```json
410+
{
411+
"podInstall": true
412+
}
413+
```
414+
415+
- デフォルトは `true`、ビルド出力に Podfile が存在する場合に自動実行
416+
- `false` に設定するとスキップ(CI で個別に `pod install` を実行する場合など)
417+
- 標準出力は info レベルでログ出力、終了コードが非ゼロの場合の stderr は error レベルで記録
388418

389419
## マルチ設定マージ
390420

@@ -461,6 +491,8 @@ Unity-iPhone(メイン)ターゲットにのみ適用されます。有効
461491
"podSource": [
462492
"https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"
463493
],
494+
"podfile": "",
495+
"podInstall": true,
464496
"capabilities": {
465497
"inAppPurchase": true,
466498
"gameCenter": false,

README.ko.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Unity iOS 빌드 후 Xcode 프로젝트를 자동으로 구성하는 에디터
2929
- **빌드 속성** — Build Settings 설정, 추가, 제거 (예: `ENABLE_BITCODE`, `GCC_ENABLE_OBJC_EXCEPTIONS`)
3030
- **Capabilities** — 인앱 결제, Game Center, 푸시 알림, Sign In with Apple, 백그라운드 모드, iCloud, App Groups, Associated Domains, Keychain Sharing, HealthKit, Siri, Personal VPN, Data Protection
3131
- **현지화**`.lproj/InfoPlist.strings` 자동 생성, 앱 이름 다국어 지원
32-
- **CocoaPods** — Podfile 기본 소스 교체, 설정을 통한 pod 의존성 주입
32+
- **CocoaPods** — Podfile 기본 소스 교체, 설정을 통한 pod 의존성 주입, `pod install` 자동 실행
3333
- **XcScheme** — 환경 변수 및 실행 인수 주입
3434
- **파일/폴더** — Xcode 프로젝트에 자동 복사 및 컴파일에 추가, `.framework`/`.bundle` 자동 인식
3535
- **컴파일 플래그** — 특정 소스 파일에 컴파일 옵션 설정
@@ -84,6 +84,8 @@ https://github.com/gameframex/com.gameframex.unity.xcode.git
8484
"environmentVariables": {},
8585
"launcherArgs": [],
8686
"podSource": [],
87+
"podfile": "",
88+
"podInstall": true,
8789
"localizations": [],
8890
"capabilities": {},
8991
"unityFramework": {},
@@ -99,6 +101,8 @@ https://github.com/gameframex/com.gameframex.unity.xcode.git
99101
| `environmentVariables` | object | XcScheme 환경 변수, 키와 값 모두 문자열 |
100102
| `launcherArgs` | string[] | XcScheme 실행 인수 목록 |
101103
| `podSource` | string[] | CocoaPods 소스 URL 목록, Podfile 기본 소스 교체 |
104+
| `podfile` | string | 커스텀 Podfile 경로, 빌드 출력에 복사 (`pods`보다 우선) |
105+
| `podInstall` | bool | Podfile 처리 후 `pod install` 자동 실행 (기본값: `true`) |
102106
| `localizations` | array | 현지화 설정 (아래 참조) |
103107
| `capabilities` | object | iOS 앱 기능 설정 (아래 참조) |
104108
| `unityFramework` | object | UnityFramework 타겟 설정 |
@@ -384,7 +388,33 @@ Unity-iPhone(메인) 타겟에만 적용됩니다. 활성화 시(기본값) Swif
384388

385389
- Key = pod 이름, Value = 버전 제약
386390
- 값이 비어있으면 → `pod 'Name'`, 값이 있으면 → `pod 'Name', 'Value'`
387-
- `pod install`은 자동 실행되지 않으며, 수동 또는 CI에서 실행해야 합니다
391+
392+
### podfile — 커스텀 Podfile
393+
394+
`pods`로 개별 의존성을 주입하는 대신, 완전한 Podfile을 직접 제공할 수도 있습니다. 설정 시 `pods`보다 우선하며, 파일이 빌드 출력에 직접 복사된 후 `podSource`에 설정된 소스 URL이 적용됩니다.
395+
396+
```json
397+
{
398+
"podfile": "XcodePodfile/Podfile"
399+
}
400+
```
401+
402+
- 상대 경로 (Unity 프로젝트 루트, 즉 `Assets/`의 상위 디렉토리 기준)와 절대 경로를 지원
403+
- 파일이 존재하지 않으면 경고를 출력하고 `pods` 설정 경로로 폴백
404+
405+
### podInstall — pod install 자동 실행
406+
407+
Podfile 처리 후 `pod install`을 자동으로 실행할지 제어합니다. 시스템 `PATH``pod` CLI가 필요합니다.
408+
409+
```json
410+
{
411+
"podInstall": true
412+
}
413+
```
414+
415+
- 기본값은 `true`, 빌드 출력에 Podfile이 존재하면 자동 실행
416+
- `false`로 설정하면 건너뜀 (예: CI에서 별도로 `pod install`을 실행하는 경우)
417+
- 표준 출력은 info 레벨로 로그 기록, 종료 코드가 0이 아닌 경우의 stderr은 error 레벨로 기록
388418

389419
## 다중 설정 병합
390420

@@ -461,6 +491,8 @@ Unity-iPhone(메인) 타겟에만 적용됩니다. 활성화 시(기본값) Swif
461491
"podSource": [
462492
"https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"
463493
],
494+
"podfile": "",
495+
"podInstall": true,
464496
"capabilities": {
465497
"inAppPurchase": true,
466498
"gameCenter": false,

README.md

Lines changed: 94 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ An editor tool that automatically configures Xcode projects after Unity iOS buil
2929
- **Build Properties** — Set, append, or remove Build Settings (e.g. `ENABLE_BITCODE`, `GCC_ENABLE_OBJC_EXCEPTIONS`)
3030
- **Capabilities** — In-App Purchase, Game Center, Push Notifications, Sign In with Apple, Background Modes, iCloud, App Groups, Associated Domains, Keychain Sharing, HealthKit, Siri, Personal VPN, Data Protection
3131
- **Localization** — Auto-generate `.lproj/InfoPlist.strings` with multi-language app name support
32-
- **CocoaPods** — Replace Podfile default source, inject pod dependencies via config
32+
- **CocoaPods** — Replace Podfile default source, inject pod dependencies via config, auto-run `pod install`
3333
- **XcScheme** — Inject environment variables and launch arguments
3434
- **Files/Folders** — Auto-copy to Xcode project and add to compilation, recognize `.framework`/`.bundle`
3535
- **Compile Flags** — Set compile options for specific source files
@@ -84,6 +84,8 @@ The configuration file must be named `XCodeConfig.json`. It can be placed anywhe
8484
"environmentVariables": {},
8585
"launcherArgs": [],
8686
"podSource": [],
87+
"podfile": "",
88+
"podInstall": true,
8789
"localizations": [],
8890
"capabilities": {},
8991
"unityFramework": {},
@@ -99,6 +101,8 @@ The configuration file must be named `XCodeConfig.json`. It can be placed anywhe
99101
| `environmentVariables` | object | XcScheme environment variables, both keys and values are strings |
100102
| `launcherArgs` | string[] | XcScheme launch arguments list |
101103
| `podSource` | string[] | CocoaPods source URLs, replaces Podfile default source |
104+
| `podfile` | string | Path to a custom Podfile to copy into the build output (takes priority over `pods`) |
105+
| `podInstall` | bool | Auto-run `pod install` after Podfile processing (default: `true`) |
102106
| `localizations` | array | Localization configuration (see below) |
103107
| `capabilities` | object | iOS app capability configuration (see below) |
104108
| `unityFramework` | object | UnityFramework target configuration |
@@ -339,6 +343,66 @@ Applied to the Unity-iPhone (main) target only. When enabled (default), automati
339343
- `validMap` — Key-value pairs, each with `key` and `value`
340344
- Automatically generates `.lproj/InfoPlist.strings` and adds them to the project
341345

346+
#### Supported languageCode values
347+
348+
Reference: [Apple Developer - Language and Locale IDs](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html)
349+
350+
Common codes are in **bold**.
351+
352+
| Code | Language | Code | Language | Code | Language | Code | Language |
353+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
354+
| **en** | **English** | **zh** | **Chinese** | **ja** | **Japanese** | **ko** | **Korean** |
355+
| **es** | **Spanish** | **fr** | **French** | **de** | **German** | **it** | **Italian** |
356+
| **pt** | **Portuguese** | **ru** | **Russian** | **ar** | **Arabic** | **hi** | **Hindi** |
357+
| **tr** | **Turkish** | **vi** | **Vietnamese** | **th** | **Thai** | **id** | **Indonesian** |
358+
| aa | Afar | ab | Abkhazian | ae | Avestan | af | Afrikaans |
359+
| ak | Akan | am | Amharic | an | Aragonese | as | Assamese |
360+
| av | Avaric | ay | Aymara | az | Azerbaijani | ba | Bashkir |
361+
| be | Belarusian | bg | Bulgarian | bh | Bihari | bi | Bislama |
362+
| bm | Bambara | bn | Bengali | bo | Tibetan | br | Breton |
363+
| bs | Bosnian | ca | Catalan | ce | Chechen | ch | Chamorro |
364+
| co | Corsican | cr | Cree | cs | Czech | cu | Church Slavic |
365+
| cv | Chuvash | cy | Welsh | da | Danish | dv | Divehi |
366+
| dz | Dzongkha | ee | Ewe | el | Greek | eo | Esperanto |
367+
| et | Estonian | eu | Basque | fa | Persian | ff | Fulah |
368+
| fi | Finnish | fj | Fijian | fo | Faroese | fy | Western Frisian |
369+
| ga | Irish | gd | Scottish Gaelic | gl | Galician | gn | Guarani |
370+
| gu | Gujarati | gv | Manx | ha | Hausa | he | Hebrew |
371+
| ho | Hiri Motu | hr | Croatian | ht | Haitian | hu | Hungarian |
372+
| hy | Armenian | hz | Herero | ia | Interlingua | ie | Interlingue |
373+
| ig | Igbo | ii | Sichuan Yi | ik | Inupiaq | io | Ido |
374+
| is | Icelandic | iu | Inuktitut | jv | Javanese | ka | Georgian |
375+
| kg | Kongo | ki | Kikuyu | kj | Kuanyama | kk | Kazakh |
376+
| kl | Kalaallisut | km | Khmer | kn | Kannada | kr | Kanuri |
377+
| ks | Kashmiri | ku | Kurdish | kv | Komi | kw | Cornish |
378+
| ky | Kirghiz | la | Latin | lb | Luxembourgish | lg | Ganda |
379+
| li | Limburgish | ln | Lingala | lo | Lao | lt | Lithuanian |
380+
| lu | Luba-Katanga | lv | Latvian | mg | Malagasy | mh | Marshallese |
381+
| mi | Maori | mk | Macedonian | ml | Malayalam | mn | Mongolian |
382+
| mr | Marathi | ms | Malay | mt | Maltese | my | Burmese |
383+
| na | Nauru | nb | Norwegian Bokmål | nd | North Ndebele | ne | Nepali |
384+
| ng | Ndonga | nl | Dutch | nn | Norwegian Nynorsk | no | Norwegian |
385+
| nr | South Ndebele | nv | Navajo | ny | Chichewa | oc | Occitan |
386+
| oj | Ojibwa | om | Oromo | or | Oriya | os | Ossetian |
387+
| pa | Punjabi | pi | Pali | pl | Polish | ps | Pashto |
388+
| qu | Quechua | rm | Romansh | rn | Rundi | ro | Romanian |
389+
| rw | Kinyarwanda | sa | Sanskrit | sc | Sardinian | sd | Sindhi |
390+
| se | Northern Sami | sg | Sango | si | Sinhala | sk | Slovak |
391+
| sl | Slovenian | sm | Samoan | sn | Shona | so | Somali |
392+
| sq | Albanian | sr | Serbian | ss | Swati | st | Southern Sotho |
393+
| su | Sundanese | sv | Swedish | sw | Swahili | ta | Tamil |
394+
| te | Telugu | tg | Tajik | ti | Tigrinya | tk | Turkmen |
395+
| tl | Tagalog | tn | Tswana | to | Tonga | ts | Tsonga |
396+
| tt | Tatar | tw | Twi | ty | Tahitian | ug | Uighur |
397+
| uk | Ukrainian | ur | Urdu | uz | Uzbek | ve | Venda |
398+
| vo | Volapuk | wa | Walloon | wo | Wolof | xh | Xhosa |
399+
| yi | Yiddish | yo | Yoruba | za | Zhuang | zu | Zulu |
400+
401+
> **Notes**:
402+
> - **Chinese**: Use `zh-Hans` (Simplified) and `zh-Hant` (Traditional).
403+
> - **Portuguese**: Common variants are `pt-BR` (Brazil) and `pt-PT` (Portugal).
404+
> - Other variants can be composed as `code-Region`, e.g. `en-GB`, `fr-CA`.
405+
342406
### plist — Info.plist Configuration
343407

344408
Supports arbitrary nested levels. Common configuration:
@@ -384,7 +448,33 @@ Supports arbitrary nested levels. Common configuration:
384448

385449
- Key = pod name, Value = version constraint
386450
- Empty value → `pod 'Name'`, non-empty → `pod 'Name', 'Value'`
387-
- `pod install` is **not** executed automatically; run it manually or in CI
451+
452+
### podfile — Custom Podfile
453+
454+
Instead of injecting individual pods, you can provide a complete Podfile. When set, this takes priority over the `pods` config — the file is copied directly into the build output, then `podSource` URLs are applied.
455+
456+
```json
457+
{
458+
"podfile": "XcodePodfile/Podfile"
459+
}
460+
```
461+
462+
- Supports relative paths (relative to the Unity project root, i.e. the parent of `Assets/`) and absolute paths
463+
- If the file does not exist, a warning is logged and the legacy `pods` path is used as fallback
464+
465+
### podInstall — Auto pod install
466+
467+
Controls whether `pod install` is automatically executed after Podfile processing. Requires the `pod` CLI to be available in the system `PATH`.
468+
469+
```json
470+
{
471+
"podInstall": true
472+
}
473+
```
474+
475+
- Default is `true`; `pod install` runs when a Podfile exists in the build output
476+
- Set to `false` to skip (e.g., when running `pod install` separately in CI)
477+
- Stdout is logged at info level; stderr on non-zero exit is logged as an error
388478

389479
## Multi-Config Merging
390480

@@ -461,6 +551,8 @@ This allows Xcode configurations from multiple SDKs / modules to be managed inde
461551
"podSource": [
462552
"https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"
463553
],
554+
"podfile": "",
555+
"podInstall": true,
464556
"capabilities": {
465557
"inAppPurchase": true,
466558
"gameCenter": false,

README.zh-CN.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Unity iOS 构建后自动配置 Xcode 项目的编辑器工具。通过 JSON 配
2929
- **构建属性** — 设置、追加、移除 Build Settings(如 `ENABLE_BITCODE``GCC_ENABLE_OBJC_EXCEPTIONS`
3030
- **Capabilities** — 内购、Game Center、推送、Sign In with Apple、后台模式、iCloud、App Groups、Associated Domains、Keychain Sharing、HealthKit、Siri、Personal VPN、Data Protection
3131
- **本地化** — 自动生成 `.lproj/InfoPlist.strings`,支持应用名多语言
32-
- **CocoaPods** — 替换 Podfile 默认源,通过配置注入 pod 依赖
32+
- **CocoaPods** — 替换 Podfile 默认源,通过配置注入 pod 依赖,自动执行 `pod install`
3333
- **XcScheme** — 注入环境变量和启动参数
3434
- **文件/文件夹** — 自动复制到 Xcode 工程并加入编译,识别 `.framework`/`.bundle`
3535
- **编译标志** — 对指定源文件设置编译选项
@@ -84,6 +84,8 @@ https://github.com/gameframex/com.gameframex.unity.xcode.git
8484
"environmentVariables": {},
8585
"launcherArgs": [],
8686
"podSource": [],
87+
"podfile": "",
88+
"podInstall": true,
8789
"localizations": [],
8890
"capabilities": {},
8991
"unityFramework": {},
@@ -99,6 +101,8 @@ https://github.com/gameframex/com.gameframex.unity.xcode.git
99101
| `environmentVariables` | object | XcScheme 环境变量,键值均为字符串 |
100102
| `launcherArgs` | string[] | XcScheme 启动参数列表 |
101103
| `podSource` | string[] | CocoaPods 源地址列表,替换 Podfile 默认源 |
104+
| `podfile` | string | 自定义 Podfile 文件路径,复制到构建输出目录(优先级高于 `pods`|
105+
| `podInstall` | bool | Podfile 处理完毕后自动执行 `pod install`(默认:`true`|
102106
| `localizations` | array | 本地化配置(详见下方) |
103107
| `capabilities` | object | iOS 应用能力配置(详见下方) |
104108
| `unityFramework` | object | UnityFramework target 配置 |
@@ -384,7 +388,33 @@ https://github.com/gameframex/com.gameframex.unity.xcode.git
384388

385389
- Key = pod 名称,Value = 版本约束
386390
- 值为空 → `pod 'Name'`,值非空 → `pod 'Name', 'Value'`
387-
- **不会**自动执行 `pod install`,需手动或在 CI 中执行
391+
392+
### podfile — 自定义 Podfile
393+
394+
除了通过 `pods` 逐个注入依赖,也可以直接提供一个完整的 Podfile 文件。设置后优先级高于 `pods` 配置——文件会被直接复制到构建输出目录,然后再应用 `podSource` 中配置的源地址。
395+
396+
```json
397+
{
398+
"podfile": "XcodePodfile/Podfile"
399+
}
400+
```
401+
402+
- 支持相对路径(相对于 Unity 工程根目录,即 `Assets/` 的上级目录)和绝对路径
403+
- 如果文件不存在,会输出警告并回退到 `pods` 配置路径
404+
405+
### podInstall — 自动执行 pod install
406+
407+
控制 Podfile 处理完毕后是否自动执行 `pod install`。需要系统 `PATH` 中有 `pod` 命令行工具。
408+
409+
```json
410+
{
411+
"podInstall": true
412+
}
413+
```
414+
415+
- 默认为 `true`,当构建输出中存在 Podfile 时自动执行
416+
- 设为 `false` 可跳过(例如在 CI 中单独执行 `pod install` 的场景)
417+
- 标准输出以 info 级别记录日志;非零退出码的 stderr 以 error 级别记录
388418

389419
## 多配置合并
390420

@@ -461,6 +491,8 @@ https://github.com/gameframex/com.gameframex.unity.xcode.git
461491
"podSource": [
462492
"https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"
463493
],
494+
"podfile": "",
495+
"podInstall": true,
464496
"capabilities": {
465497
"inAppPurchase": true,
466498
"gameCenter": false,

0 commit comments

Comments
 (0)