I'm trying to write unit tests for an iOS framework I'm creating. Under the covers it uses Nuance's Dragon Mobile SDK. When I run my unit test in Jetbrains' AppCode, I get this error:
2012-08-15 17:43:48.874 otest[62547:707] *** Assertion failure in -[KeychainManager writeToKeychain], /checkout_120606-1556/NMSPClient/sdk/c/trunk/solutions/iPhone/NMSP/../../../source/oem/iphone/src/KeychainManager.m:285
Couldn't add the Keychain Item.
Unknown.m:0: error: -[NuanceVoiceRecognizerTest testExample] : Couldn't add the Keychain Item.
When I run the test in XCode, it works fine. In fact XCode spins up the simulator to run the test, whereas AppCode doesn't seem to want/need to.
Now, the reason the Nuance bit is relevant is that it's the thing that's trying to do stuff with the keychain when I set it up:
[SpeechKit setupWithID:@"<snip>"
host:@"sandbox.nmdp.nuancemobility.net"
port:443
useSSL:NO
delegate:self];
Now I know one answer here is to just run the test in XCode. But I have a real hard time with XCode, given how primitive it is on the code-editing front. More importantly, I'm missing some key concept here and that's annoying me.
To the question: What might be missing that would cause my code to fail to access the keystore when the unit test runs? Anyone run into this sort of thing before, even in XCode?