ARTICLES
How to fix the Swift 4 @objc inference warning
After installing Xcode 9 and migrating to Swift 4 from Swift 3 I received this warning:
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 “AppName” target.
I resolved this issue by going to the projects build target. Selecting “Build Settings”. Searching for “Inference” then changing the setting for “Swift 3 @objc Inference” from “On” to “Default”. If you have multiple targets in your project you may have to do this for each target.
If you found this helpful then let us also help you earn more with Apple Search Ads at https://kitemetrics.com/.
Our Products
Kitemetrics
Keyword level attribution for Apple Search Ads. Optimize your bids and increase your revenue. Sign up for free at kitemetrics.com.
White Noise and Deep Sleep Sounds
Calming and relaxing sounds that will help you sleep like a baby tonight.
Download for free from the App Store.
Get it on Google Play.
Our Sponsors
Get Sleepy
The free podcast that puts you to sleep with meditative bedtime stories. Listen at getsleepy.com.