The problem is the project is under source control and every time I pull the .xcodeproj is updated. And since my provisioning profile is different than the one in source control, the Unit Test target automatically switches to "Do not code sign". So I simply have to set the profile there after each git pull.
Apparently if deploying to a device, if there is a unit test target, it must be code signed.
Steps:
1) Change target to your test target (AppnameTests)
2) Make sure "Code Signing Identity" is NOT "Don't Code Sign". Pick a profile to sign with
That is all I had to change to get it to work.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…