When running my Test target with code coverage enabled in Xcode 5, I get dozens of the following message in the build output:
profiling:invalid arc tag (0x..
I'm having the same issue. In my appDelegate
under applicationWillTerminate:
I have the __gcov_flush();
. Commenting this out removes the invalid arc tag
messages in my build output.
I'm doing further research to figure out why this happens. I know that if I completely clean my project and delete the DerivedData
directory these messages will stop for a few runs of my tests.
EDIT: I seemed to have fixed this for me. In my appDelegate I had the following:
#ifdef DEBUG
+ (void)initialize {
[[NSUserDefaults standardUserDefaults] setValue:@"XCTestLog,GcovTestObserver"
forKey:@"XCTestObserverClass"];
[super initialize];
}
#endif
I spelled GcovTestObserver
wrong, and after fixing this the messages stopped. Make sure you also have a subclass of XCTestObserver
in your Test target overriding stopObserving
with the following:
- (void) stopObserving
{
[super stopObserving];
UIApplication* application = [UIApplication sharedApplication];
[application.delegate applicationWillTerminate:application];
}