Is using @objc inference deprecated in Swift 4 mode? How to fix?
Hello everyone! I updated my project from Xcode 8 (Swift 3) to Xcode 9 beta (Swift 4). Right after opening the project, Xcode showed a bunch of warnings: "The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address this warning..." I'm confused because in Swift 3 I could just write a method or property, and it would automatically become available to Objective-C. For example, I have this code:\n\n```swift\nclass MyClass: NSObject {\n var name: String = ""\n func doSomething() {\n print("Doing something")\n }\n}\n```\n\nIn Swift 3 this code worked without errors, and I could call `doSomething()` from Objective-C. Now Xcode 9 is complaining. Do I need to rewrite the entire project? What is @objc inference and why is its use deprecated? How to fix it correctly?