So randomly after several hours of work this morning on my app, Xcode just stopped letting me test my app on my iPhone. But I can still test it in the simulator.
Now
First make sure your certificates haven't expired and then follow the steps listed by king foot:
Move the iOS developer certificate from local to system using Key Chain:
What I did to solve it was:
Quit Xcode
Open Keychain Access
Go to Login tab
Drag your certificate into System tab
Reopen Xcode
Run your app
Six years ago I added the agvtool to a build script to auto-increment the build numbers in the project. For some reason, this week that started causing every single build to fail with the above, seemingly cryptic errors. Removing the script from my Build Phase allows my app to build again. The offending script: "xcrun agvtool next-version -all" Perhaps the latest update of Xcode is very particular about the project file being changed in the middle of a build?
Ok so I solved this, don't know if it's the right way or not.
Moved my iOS developer certificate from local to system using Key Chain.
Steps:
In my case, it was solved by
I had the same problem - I resolved it by restarting my MacBook several times.