简体   繁体   English

OCUnit已被弃用。 将Xcode升级到5.1后出现错误

[英]OCUnit is deprecated. Error After upgraded Xcode to 5.1

I have just updated to Xcode 4.6 to 5.1 and iOS 7.0 to7.1.1Now my project is displaying a Warning alert view ”OCUnit Deprecated The project “Project Name” uses OCUnit for unit testing, which is deprecated. 我刚刚更新到Xcode 4.6到5.1和iOS 7.0到7.1.1现在我的项目显示警告警报视图“OCUnit已弃用项目”项目名称“使用OCUnit进行单元测试,不推荐使用。 Choose “Convert to XCTest” to update this project to use XCTest for unit testing.” 选择“转换为XCTest”以更新此项目以使用XCTest进行单元测试。“

在此输入图像描述

Does it affect my app when i submitting to app store? 当我提交到应用商店时,它会影响我的应用吗?

How to remove this warning (or) how to update my application to use XCTest for unit testing. 如何删除此警告(或)如何更新我的应用程序以使用XCTest进行单元测试。

No, it does not affect the app store submission. 不,它不会影响应用商店提交。 XCTest is also not supported as far as I know if your app still runs on older versions of iOS. 如果你的应用程序仍在旧版本的iOS上运行,我也不支持XCTest。

You will need to switch "at some point", because Xcode 6, which might be released as a beta in the next few weeks, probably will not support OCUnit. 你需要在“某个时刻”进行切换,因为Xcode 6可能会在未来几周内作为测试版发布,可能不会支持OCUnit。 You may not be able to run your unit tests at all soon unless you upgrade. 除非升级,否则您可能无法立即运行单元测试。

But until then, there is no pressing need to upgrade. 但在那之前,没有迫切需要升级。 When you're ready to do it, just commit all your changes to git/etc so you can roll back if it goes wrong, then click the "convert to XCTest" button. 当你准备好了,只需将所有更改提交到git / etc,这样你可以在出错时回滚,然后点击“转换为XCTest”按钮。 It should just work... if it doesn't, post here with your specific problem. 它应该工作......如果没有,请在此处发布您的具体问题。

As a general rule, I would not rush to adopt any new features in Xcode. 作为一般规则,我不会急于在Xcode中采用任何新功能。 There tend to be bugs and sometimes Apple abandons new technology a year after adopting it. 往往存在缺陷,有时苹果在采用新技术后一年就放弃了新技术。 But XCTest has been the default for a year now, and I haven't heard any complaints (except for bugs in the early days), so it's safe to switch. 但XCTest现在已经默认了一年,我没有听到任何抱怨(早期的漏洞除外),所以切换是安全的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM