7

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. Choose “Convert to XCTest” to update this project to use XCTest for unit testing.”

enter image description here

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.

user1118321
  • 25,567
  • 4
  • 55
  • 86
Musthafa
  • 862
  • 3
  • 12
  • 27

1 Answers1

9

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.

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. 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. 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. 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.

Abhi Beckert
  • 32,787
  • 12
  • 83
  • 110
  • 1
    +1 for the commit before :) I personally had only 3 files updated by the operation: `myproj.xcodeproj/project.pbxproj`, `myprojTests/myprojTests.h`, `myprojTests/myprojTests.m` – Pierre de LESPINAY Jun 03 '14 at 09:58
  • This happened for months, every time I relaunched Xcode 7. I would click "Convert to XCTest", then it would say there was nothing to convert, then the next time I relaunched Xcode 7, I'd get that stupid warning again. Deleting the old "Test" target in Xcode did not help. The only way to get rid of it was to open the pbxproj file with a text editor and manually delete the dictionary which for some reason was still in there defining this target, and also a reference in the target list to its UUID. – Jerry Krinock May 03 '16 at 14:04