Hi,
I'm trying to set up my unit testing for an iPhone application using XCode 3.2.3.
I followed the steps in http://developer.apple.com/iphone/library/documentation/xcode/conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html
As closely as I could, but I am getting this error message upon trying to build: "((yourApplicationDelegate) != nil)" should be true. UIApplication failed to find the AppDelegate
(this being the default trivial test for USE APPLICATION UNIT TEST is true)
I am building my app test target, as is discussed in the documentation, and get this error.
Do I need to ensure all my non-test case source is in my test bundle?
confused
--
I included the source files into my project and it compiles fine, but it still suffers the same unit test error:
"((yourApplicationDelegate) != nil)" should be true. UIApplication failed to find the AppDelegate
The original code is the same as the template code:
-(void) testAppDelegate {
id yourApplicationDelegate = [[UIApplication sharedApplication] delegate];
STAssertNotNil(yourApplicationDelegate, @"UIApplication failed to find the AppDelegate");
}