Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

455
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!