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.
I fixed the issue (temporarily) by going to Edit Scheme, then in the Build section, removing my unit test target from being invoked in "Run".
The other advice here didn't help me, but I fixed this error by going to Product > Scheme > Edit Scheme
. Then I clicked Build
on the left hand side and deselected any checkboxes next to AppNameTests
. I'm using XCode 6.3
I fixed it by manually selecting a provisioning profile in the build settings for the test target.
Test target settings -> Build settings -> Code signing -> Code sign identity. Previously, it was set to "Don't code sign".
Also, if you set your build target device, the problem will go away when you testing and debugging. The code signed is only need when you trying to deploy your app to an actually physical device
I changed mine from "myIphone" to simulator iPhone 6 Plus, and it solves the problem while I'm developing the app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With