是否不能使用“分析"?与迅速? [英] Is it not possible to use "Analyze" with swift?

查看:30
本文介绍了是否不能使用“分析"?与迅速?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以前使用 Objective-c 代码,我可以分析"——CMD + Shift + B 和 Xcode 会警告我我的各种不当行为.

Previously with objective-c code, I could "Analyze" - CMD + Shift + B and Xcode would warn me of all kinds of wrongdoings on my part.

似乎有了 Swift,我就不会出错!没有任何警告!但显然我的代码中存在内存泄漏.

It seems that with Swift, I can do no wrong! No warnings of any kind! But clearly there is a memory leak in my code.

是否需要启用某些设置才能让 Swift 正确分析我的代码?(我知道我应该使用分析器并在实际设备上进行测试,我确实这样做了,但我想知道为什么分析"没有做任何事情.

Is there some setting I have to enable to get Swift to analyze my code properly? (I am aware I should use the profiler and test on an actual device, which I do, but I wonder why "Analyze" doesn't do anything.

推荐答案

很遗憾没有.即使后来发布了很多版本,最新版本的 XCode(6.4)仍然无法进行 Swift 分析.分析"选项仅适用于项目中的目标 C 文件.

Unfortunately no. Even many releases later, the latest version of XCode (6.4) still cannot do Swift analysis. The 'Analyze' option only works for the Objective C files in your project.

希望下一个版本能够拥有它,以及仍然仅限于 Objective C 代码的重构功能.

Let's hope the next version will have it, along with the refactoring capabilities which also are still limited to Objective C code.

这篇关于是否不能使用“分析"?与迅速?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆