在Xcode真機調試開發(fā)過程中,無論是使用個人證書或者是企業(yè)證書,經常會遇到這樣的問題:
The certificate used to sign "XXX" has either expired or has been revoked. An updated certificate is required to sign and install the application.
剛開始在key里刪除證書,在Xcode中fix一下,好像問題也不大。
但是最近頻發(fā)發(fā)生這樣的事情,有時候需要耗費很久才能在搞定。
后來在stack overflow找到一個帖子,是這樣解決的:
http://stackoverflow.com/questions/36689116/certificate-has-either-expired-or-has-been-revoked
帖子中是這么說的:
First of all clean the project by holding Shift(?)+Command(?)+K or Select Product > Clean
Then
Go to XCode Menu> Preference
Select Account > Team > View Details
Select any Provisioning profile from Provisioning Profiles list
Right click > Select Show in Finder. Then you will see all lists of provisioning profiles
Select all provisionaling list from the folder and move it to trash
Download All provisioning profiles by clicking Download All below Provisioning Profile lists.
Now, Run again and it should Work!
那么現(xiàn)在,翻譯出來就是:
首先清潔項目按鍵shift(?)+命令(?)+ K或選擇產品>清潔,然后去XCode菜單>首選項選擇賬戶>
?Team >視圖的細節(jié),從配置概要文件列表中選擇任何配置配置文件右鍵單擊>在Finder中選擇
Show。

然后你會看到所有配置概要文件的列表,選擇所有的臨時列表文件夾并將其移動到垃圾桶。
刪除完配置文件之后點擊這里下載。

下載所有配置概要文件之后再次運行,就可以啦!