[翻譯] iOS代碼簽名錯誤診斷索引

iOS代碼簽名錯誤診斷索引

原文: iOS Code Signing Troubleshooting Index

本文是一個索引列出了常見的iOS代碼簽名錯誤信息。首先請先確保你的項目使用的是自動配置描述文件;這將能解決很多代碼簽名錯誤。真機調(diào)試的程序、Beta測試程序,或是提交到appstore的程序都需要代碼簽名,相關(guān)的錯誤會在如下章節(jié)說明。

引言

第一步,在遇到代碼簽名問題時,請先確認(rèn)你的項目是自動配置描述文件;這是我們推薦和支持的工作方式,而手動配置描述文件的方式會引起更多的錯誤并且需要花費更多的時間去處理。

確認(rèn)你的項目是自動配置描述文件

第一步,在遇到代碼簽名問題時,請先確認(rèn)你的項目使用的是自動配置描述文件方式。這里有一份關(guān)于如何配置自動描述文件的指南

QA1814 Setting up Xcode to automatically manage your provisioning profiles.

真機調(diào)試、Beta測試、提交app

第二步,在遇到代碼簽名問題時,請先確認(rèn)你遵循了合適的工作方式。下面有一份關(guān)于常見代碼簽名錯誤的列表,并且這些關(guān)于代碼簽名的流程是被蘋果支持的。

xcode 真機調(diào)試

App Distribution Guide > App Distribution Guide

Beta 測試

以下分為兩塊Beta測試

1. TestFlight Beta測試

使用app store發(fā)布版描述文件簽名你的程序提交到iTnues connect 進(jìn)行 TestFlight Beta測試。一旦Beta測試通過,在iTnues connect 你就可以簡單的把app發(fā)布到app store。這是很好的Beta 測試方式,因為你不必重新打包、重新簽名你的app到app store 發(fā)布。

App Distribution Guide > Beta Testing iOS Apps > Distribuing Your Prerelease Build Using TestFlight

2.Ad hoc Beta測試

只有Ad Hoc Beta測試你不能使用TestFlight

測試Ad Hoc發(fā)布的iOS程序,請遵循如下步驟

App Distribution Guide > Beta Testing iOS Apps > Distributing Your Beta App Using Ad Hoc Provisioning

提交到app store

參考如下提交您的app到appstore審核

App Distribution Guide > Submitting Your App to the Store > Submitting Your App to the Store

企業(yè)版發(fā)布

在iOS開發(fā)指南里面這篇文章講述了企業(yè)app發(fā)布的流程 > Introduction

客戶與生產(chǎn)商發(fā)布方式

當(dāng)開發(fā)商生產(chǎn)app必須發(fā)布到app客戶或自家時,你必須遵循如下方式,進(jìn)行企業(yè)版分發(fā)

QA1763 how can a buil engineer distribute an app ou behalf of the team?

讓你其他的mac支持代碼簽名

為了讓你其他的mac支持代碼簽名,作為OS X 的用戶,你需要使用 xcode 導(dǎo)出你本機的代碼簽名文件,詳細(xì)操作步驟:

App Distribution Guide > 維護(hù)您的簽名標(biāo)識和文件 > Exporting and Importing Certificates and Profiles

代碼簽名錯誤列表

在前面的章節(jié)里,我們確認(rèn)你遵循使用自動配置描述文件和蘋果公司說明的代碼簽名方式。針對具體的代碼簽名錯誤,請參閱下面列表的代碼簽名主題以及其相應(yīng)的錯誤診斷信息。

缺少證書或私鑰錯誤

這些錯誤表明你在進(jìn)行代碼簽名時,缺少了必要的證書或私鑰。

Missing Signing Identities
No Matching Signing Identity or Provisioning Profiles Found
The Private Key for Your Signing Identity Is Missing
The Private Key for a Developer ID Certificate Is Missing

參考如下指南解決這些錯誤

App Distribution Guide > Trobuleshooting > Certificate Issues

對于AppStore版程序,這些缺少簽名證書的錯誤可以通過簡單的重新創(chuàng)建證書來解決。參考如下詳細(xì)說明: App Distribution Guide > Maintaining Your Signing Identities and Certificates > Re-Creating Certificates and Updating Related Provisioning Profiles

對于企業(yè)版程序,這些缺少發(fā)布證書或私鑰的,你必須參考如下討論的情況: QA1868 - Missing Enterprise Distribution Certificate Private Keys.

描述文件相關(guān)的錯誤

一般的描述文件錯誤如下:

Invalid Provisioning Profile
Provisioning Profiles Installed on Your Device Are Invalid
No Such Provisioning Profile Was Found

參考如下建議的解決方式:

App Distribution Guide > Troubleshooting > Provisioning Issues

Provisioning Profiles Appear Invalid in Member Center

對于一些描述文件為啥變成不可用的了,參考如下:

QA1878 - Resolving the Provisioning Profile Invalid Status

安裝失敗

如果你的app在執(zhí)行安裝的過程中發(fā)生錯誤,參考如下:

TN2319 - Installation Failure Troubleshooting for iOS

簽名校驗錯誤

如下app校驗錯誤

The bundle is not signed using an Apple submission certificate
Missing or Invalid Signature. (rejection email)
The bundle ... at bundle path ... is not signed using an Apple submission certificate

針對上述的簽名校驗錯誤,參考如下:

TN2318 - Troubleshooting Failed Signature Verification.

配置錯誤

Invalid Code Signing Entitlements

關(guān)于配置錯誤,參考如下指南:

? TN2415 - Entitlements Troubleshooting

? QA1798 - Checking Distribution Entitlements

None of valid provisioning profile allowed the specified entitlements

這種錯誤表明xcode期望針對你的app指定個配置文件,但是沒有發(fā)現(xiàn)一個包含描述文件配置文件;針對這種錯誤有不同的解決方式,取決你的xcode需要的配置文件;

beta-reports-active

參考如下文檔:

QA1830 - The beta-reports-active Entitlement.

其他相關(guān)配置

  1. 同步本地的xcode描述文件庫和當(dāng)前的狀態(tài)的證書,程序id :Xcode > Preferences > Accounts > (your account) > View Details > "?" button.

  2. 通過具體的分析問題,參考如下配置你的app. TN2415 Entitlements Troubleshooting.

其他錯誤

本章內(nèi)容不可能列出所的錯誤信息,針對一般的錯誤,請參照如下列表的類型:

Your account already has a valid iOS distribution certificate

這個錯誤主要是說開發(fā)使用的mac缺少發(fā)布證書或私鑰,因此xcode正在嘗試生成一新的發(fā)布證書或私鑰,然而未能成功,因為你的團(tuán)隊創(chuàng)建的發(fā)布證書已經(jīng)達(dá)到最大數(shù)量。

使用如下方式解決該問題:

從別的電腦上獲取你電腦上缺少的證書或私鑰,參考:Enabling code signing on your other Macs
刪除并重新創(chuàng)建發(fā)布證書,參考:App Distribution Guide > Maintaining Your Signing Identities and Certificates > Re-Creating Certificates and Updating Related Provisioning Profiles

注意:企業(yè)版開發(fā)者在解決缺少發(fā)布證書私鑰錯誤時,應(yīng)當(dāng)特別注意如下情況。 QA1868 - Missing Enterprise Distribution Certificate Private Keys

關(guān)于

隨性而譯,無細(xì)校對,歡迎指正文中不合適的地方。
dev.keke@gmail.com 翻譯于 2016-04-12

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容