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

459
Vistas
Xcode 10.2 Swift Error: Function types cannot be represented in Objective-C unless their parameters and returns can be

I updated Xcode to 10.2 today and I got the following errors:

Method cannot be marked @objc because the type of the parameter 2 cannot be represented in Objective-C

Function types cannot be represented in Objective-C unless their parameters and returns can be I don't understand why

It was perfectly fine in 10.1. This is an example that I have been using for years without any issues. How can I make this code to compile without errors?

@objc public func myFunction(inputString: String, handler:@escaping ((success: Bool, outPut: NSArray)) -> Void) {
    // do stuff
}
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Delete the phrase outPut:. It was always illegal; Swift 5 just tightens up at last.

So:

@objc public func myFunction(inputString: String, handler:@escaping (NSArray) -> Void) {
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