iOS Developer

Xcode 9 Beta 警告: The use of Swif

2017-06-28  本文已影响0人  喵呜呜喵

刚更新了Xcode9 的Beta版, 使用它打开最近在学习的Swift 3.0的微博项目时, 发现有这么一个警告

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 disable Swift 3 @objc inference.

大概意思好像是在Swift 3中的@objc推断在Swift 4中已经被废弃, 你的代码中已被废弃的Swift 3 的@objc inference是可用的, 需要禁止掉Swift 3的 @objc inference.

什么玩意儿?看不懂, 在谷歌上搜索了下发现stackoverflow上已经有人回答了这个问题了.

问题网址:

https://stackoverflow.com/questions/44379348/the-use-of-swift-3-objc-inference-in-swift-4-mode-is-deprecated

在 项目 - TARGETS - Build Settings - 里搜索 inference - 修改成Off command + B, 警告消失.

不是 interface! 不是 interface!不是 interface!

嗯, 重要的事情说三遍, 发现简书上还没人po过这个问题, 我就po一发了哈哈哈!

上一篇下一篇

猜你喜欢

热点阅读