原因
1、
Ihad the exact same error, and tried everything under the sun,including what was suggested elsewhere on this page. What theproblem was for me was that in Keychain Access, the actual AppleWWDR certificate was marked as "Always Trust". It needed to be"System Defaults". That goes for your Development and Distributioncertificates, too. If any of them are incorrectly set to "AlwaysTrust", that can apparently cause this problem.
So, in Keychain Access, click on the Apple Worldwide DeveloperRelations Certificate Authority certificate, select Get Info. Then,expand the Trust settings, and for the combo box for "When usingthis certificate:", choose "System Defaults".
2、Foranyone with this problem in the future (who doesn't want to rebuildtheir project), an additional question to ask is whether you have aspace in your product name. I'd recommend going through yourproperties (right-click -> get info) of your project and yourtarget. For my project, the only place that a space was needed wasin the plist for the bundle display name.
3、just restart