這幾天因工作需要,去給客戶演示iOS項目打包的過程。之前演示都是順利的,但后來客戶自己操作時打電話說遇到了問題,出現報錯。
就過去看了一下,發現一個很陌生的錯誤提示:
The operation couldn’t be completed. Unable to log in with account ‘XXX@163.com’. Provisioning profile "iOS Team Provisioning Profile: XXX” doesn't include the currently selected device “XXX”.
第一個報錯,是理解的,所以當時就讓客戶先登錄自己的賬號。
但第二個報錯卻很是陌生,但沒辦法,總要去解決的,又不能讓客戶在那里等着。所以就先手動配置證書文件去打個包,最起碼任務完成了。
臨走前,就把這個報警提示保留了一份。回來查了很多資料,都沒給出滿意的解決方法,而且開發者賬號和證書都在客戶手里,我想去實驗也沒辦法。
最后找到這個說法還算滿意:
The operation couldn’t be completed. Connection reset by peer Provisioning profile "iOS Team Provisioning Profile: com.guorenzhicheng.H-Students-XX" doesn't include signing certificate "iPhone Developer: 書源 范 (E62R7X86K7)". Provisioning profile "iOS Team Provisioning Profile: com.guorenzhicheng.H-Students-XX" doesn't include the currently selected device "范書源的 iPhone".、 因為在 電腦證書里有一個證書重復,需要在鑰匙串里刪除一個,然后再重新配置。
另有PaulpauL 提醒補充說明:遇到該問題時使用的是企業級證書,而且使用的是發布證書,不存在添加設備的name和UDID到證書中的問題。