Ios – Code signing is required for product type Unit Test Bundle in SDK iOS 8.0

iosobjective cxcode

Getting

Code signing is required for product type 'Unit Test Bundle' in SDK
'iOS 8.0'

My app target is code signing just fine – but my test target is not. I bought a new computer, created a new development certificate from the computer, updated the provisioning profile accordingly, installed both, but can't get past this code signing error.

Any way of wiping all certs/profiles locally so I can reinstall?

Probably some kind of bug.

Best Answer

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)

enter image description here

2) Make sure "Code Signing Identity" is NOT "Don't Code Sign". Pick a profile to sign with

enter image description here

That is all I had to change to get it to work.