Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

383
Vistas
KMM error: This API is internal in ktor and should not be used. It could be removed or changed without notice

After updating Xcode to 13.0, I cannot run my iOS app which is using Kotlin Multiplatform.
Build fails with Command PhaseScriptExecution failed with a nonzero exit code, and it says that the error is:

Task :shared:compileKotlinIos FAILED
e: /Users...path.../KtorClient.kt: (134, 17): This API is internal in ktor and should not be used. It could be removed or changed without notice.

We have also had similar errors after updating to Xcode 13, but it is always something with shared KMM library, JDK etc... This error showed many times:
> Process ‘command ‘/Library/Java/JavaVirtualMachines/jdk-11.0.12.jdk/Contents/Home/bin/java’' finished with non-zero exit value 1

134 line of KtorClient.kt:

override suspend fun createPassword(email: String, password: String): CreatePasswordResponse {
        return client.post {
            url {
                path("v1", "user", "create_password")
                body = LoginRequest(email, password)
            }
            headers {
/*134.line*/    append(HttpHeaders.ContentType, ContentType.Application.Json)
            }
        }
    }

We have tried deleting XCWorkspace, Podfile.lock, Pods folder, then pod reinstalling, deleting derived data, nothing helped.

We have also tried different versions of Ktor, JDK, nothing helped.

Also this command found on the Internet didnt help(they say you should run it after updating Xcode):

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

This is a known issue of Ktor, related to this fix in Kotlin.

Here's what documentation says:

Note that the StringValuesBuilder class that exposes the append function is incorrectly marked with the InternalAPI annotation. This issue will be fixed in v2.0.0. As a workaround, you can add the @OptIn(InternalAPI::class) annotation to explicitly opt-in to use this API.

You can opt-in your specific line with @OptIn(InternalAPI::class), or add this in your shared module build.gradle.kts to take effect on the whole module:

kotlin {
    // ..
    sourceSets {
        all {
            languageSettings.optIn("io.ktor.util.InternalAPI")
        }
        // ...
    }
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda