docs(lesson6): add concise rationale for ExperimentalForeignApi and ExperimentalObjCName
This commit is contained in:
1 parent
7e649cc26c
commit
f2b35a2a3e
1 file changed
+9
@@ -86,6 +86,15 @@ kotlin {
|
||||
|
||||
> 如果你项目当前版本不一致,以你项目里已锁定版本为准。
|
||||
|
||||
补充说明(这两行为什么要加):
|
||||
|
||||
- `languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")`
|
||||
- 用于允许 iOS/Native 侧 C 互操作相关的实验 API(常见于 Darwin/平台互操作场景)。
|
||||
- `languageSettings.optIn("kotlin.experimental.ExperimentalObjCName")`
|
||||
- 用于允许 `@ObjCName` 等和 Objective-C/Swift 导出命名相关的实验能力。
|
||||
|
||||
这两行主要是为了减少 KMP iOS 侧编译期 opt-in 警告/报错,保证多端示例在课堂环境更稳定。
|
||||
|
||||
### 2. Ktor 官方文档(课堂可直接贴)
|
||||
- Ktor Multiplatform Client 官方教程:
|
||||
`https://ktor.io/docs/client-create-multiplatform-application.html`
|
||||
|
||||
Reference in new issue
Block a user