Unit tests only run automatically when active SDK is "simulator"?
- by Steve Madsen
I have followed the instructions Apple publishes for unit testing applications on iPhone and things work great when I set the active SDK to "iPhone Simulator". I have it configured to always build and run my tests as part of building the application itself.
Apple implies (by omission) that this should work all of the time, but the tests are skipped when I set the active SDK to "iPhone Device". I am also linking with OCMock, and instead of a failing test, this warning is in the build log:
ld: warning: in .../build/Debug-iphoneos/OCMock.framework/OCMock, missing required architecture arm in file
It's very nice to make the unit test bundle a dependency of the main application, so these tests run at every build, but its utility is greatly diminished if it doesn't work during device builds. Is this a known, but undocumented, limitation?