Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Objective-C Warning RunUnitTests is obsolete. Xcode 7

I am getting this warning in Objective-C:

RunUnitTests is obsolete. To run unit tests for your target, use the Test scheme action in the Xcode IDE and the test action in xcodebuild.

I did some googling around and found a solution to add TEST_AFTER_BUILD and set it to YES in User-Defined settings. After doing this the warning is still there. What am I doing wrong?

like image 222
user979331 Avatar asked Sep 23 '15 15:09

user979331


1 Answers

You need to delete the Run Script build phase that invokes RunUnitTests from your unit test bundle target, as suggested by the Xcode info message when it tries to build your unit test bundle.

This is the offending Run Script build phase, likely stuck there by a previous version of Xcode:

enter image description here

like image 89
Glen Low Avatar answered Nov 15 '22 22:11

Glen Low