iOS Provisioning Profile總莫名其妙失效問題
剛做iOS不太久介评,遇到一個非常奇怪的問題:證書明明還有一年的時間,可是在把App安裝到真機上時廉羔,三天兩頭出現(xiàn)“已過期”之類的提示瞄勾,不得不經(jīng)常重復以下動作序列:
- 刪除Mac上的Profile
- 刪除手機上的Profile
- 在Appple Member Center重新Edit(以讓其有效)
- Mac重新取Profile
- 安裝到真機
真的是“三天兩頭”出現(xiàn),有時正著急要看效果時辛掠,這個問題就給你搗亂……
曾經(jīng)google多次谢谦,得到的線索有(可能導致Profile失效的原因):
- App ID 改變
- 在Member Center新加了device
- App的Capabilities改變
都試過了,沒有好轉(zhuǎn)
在經(jīng)歷了大約3個月的苦難日子之后萝衩,在MemberCenter閑逛回挽,發(fā)現(xiàn)其中有Developers,猛然意識到猩谊,我們幾個developer用的Certificate都是當時申請開發(fā)者賬號的那個郵箱地址zhxxx@xxx.com千劈,是不是這樣亂用會帶來問題?
進一步看了以下预柒,申請賬號的那個郵箱的角色是Agent队塘,他可以邀請100個developer(發(fā)郵件給他們,他們再通過自己的Apple ID)登錄Member Center宜鸯,完成邀請流程憔古,從而具有和Agent一樣的“讀”權(quán)限,(當然淋袖,“寫”權(quán)限比較低)鸿市。這應該是正確的做法。之前那樣的亂用即碗,效果相當于一個人不停地從一臺Mac切換到另一臺焰情,又切換到另另一臺“粒看起來像下面這種情況:
If the certificate already exists in Member Center, a “Your account already has a valid certificate” dialog appears. Typically, this happens when you move from one Mac to another. If possible, export your certificates as a developer profile file on the other Mac, and then import them on your new Mac, as described in Exporting and Importing Certificates and Profiles. If you don’t have a backup of your developer profile, click the “Revoke and Request” button when the “Your account already has a valid certificate” dialog appears.
You can also request specific types of certificates, as described in Requesting Signing Identities.
于是内舟,試著向正確的方式遷移:給每個developer發(fā)一個邀請,然后大家再逐一在Member Center完成該走的
流程初橘。這樣的方式實行了兩個周多验游,沒有再出現(xiàn)過失效充岛,我心安了。