joeswift
joeswift

Reputation: 21

The use of Swift 3 @objc inference in Swift 4 mode is deprecated? (again)

I already tested all suggestions from The use of Swift 3 @objc inference in Swift 4 mode is deprecated?

My problem is: I can set it up any way, I don't get any specific error where I would have used inference (probably without knowing it).

So it still says: "The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "projectUITests" target."

The two tests also appear in red font.

If I switch @objc inference to On/Off/Default, it doesn't change anything. I also went through the entire project and added @objcMembers on the top of the code (where possible, where not, I removed the code temporarily). I still get the same error.

Any suggestion is welcome.

Thank you.

Upvotes: 2

Views: 609

Answers (1)

Adi219
Adi219

Reputation: 4814

  1. Click on the project (the first thing in the massive drop-down list)
  2. Click on the Targets section that appears
  3. Search for the Swift 3 @objc interference section
  4. Turn it On and fix any warnings/errors that pop up
  5. Turn it to Default and your project should run without any issues

Upvotes: 1

Related Questions