Reputation: 630
After completing my app I run a test from Xcode, Product -> Test, it says 'Build Succeeded' and the app pops up for a split second, but then it prompt me with this message:
I have searched a lot but couldn't find any solution that works in this case. I want to mention that I have also tried changing the name of the application from, CSQTCConference, to CSQTC Conference, not sure how relevant this is.
I am planning to release my application to app store today, but this issue is holding it back. It will be helpful if you can suggest any pointers to resolve this issue.
Upvotes: 3
Views: 2994
Reputation: 1
The real question is: Why is this happening?
Answer: You did a Command U, or selected test. This ran the default test, which always fails.
Correction: Comment out the fail line, and run it again.
Upvotes: 0
Reputation: 4198
I just comment the following line:
//XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
in:
#import <XCTest/XCTest.h>
@interface KinderAppTests : XCTestCase
@end
@implementation KinderAppTests
- (void)setUp
{
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown
{
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testExample
{
//XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
}
@end
This solution worked for me, hope it helps :)
Upvotes: 2
Reputation: 108091
I'm not familiar with XCTest but I assume XCTFail
will always fail, so no big surprise here.
You are running boilerplate example code, which created a test that always fails. If you haven't written your own tests what's the point of running them in the first place?
Upvotes: 1