默认情况下,XCode for iOS4 项目中是否存在针对已弃用代码的编译警告或错误?
我最近接手了一个iPhone项目,该项目是在iOS4之前开发的。我想知道 XCode 是否会在编译时提示警告或错误。目前,它在构建时“没有问题”成功,因此可以安全地断言它不包含已弃用的代码吗?或者是否需要在 XCode 上设置一个设置来警告编译已弃用的代码?
I took over an iPhone project recently that was developed prior iOS4. I'm wondering if XCode would prompt warnings or errors on compile. It currently succeeds with "No issues" when built so is it safe to assert that it contains no deprecated code? Or is there a setting to be set on XCode to warn on compile for deprecated code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Xcode 中有一个设置可以隐藏已弃用的警告:转到 Targets ->您的目标 ->获取信息 ->构建->警告已弃用的函数。
您可以检查该设置是否已打开(默认情况下处于打开状态),以确保您收到所需的“已弃用”警告。
There is a setting in Xcode to hide deprecated warnings: Go to Targets -> Your Target -> Get Info -> Build -> Warn About Deprecated Functions.
You can check if that setting is on (It's on by default) to make sure you're getting the "deprecated" warnings you want.
是的。构建项目。检查 XCode 中目标和设备所在的最顶部栏。在 xxdevice 上运行...xxtarget..旁边显示一个带有 !(说明标记)的黄色三角形。单击该按钮即可获取弃用信息。
Yes. Build the project. Check the top most bar where your target and device are in XCode. Next to Running...xxtarget..on xxdevice is shown a yellow triangle with !(explanation mark). Click on that to get deprecations.