[iOS] 關於 Provisioning Profiles 這些事
[前言]
當擁有有開發者帳號最重要的一件事情就是實機部屬測試,但事與願違,進行實機測試常常會有很多錯誤,讓你憑證檔 (Certificates) 跟提供描述檔(Provisioning Profiles) 常常砍阿砍得裝阿裝到最後為什麼可以RUN也不知道,所以這篇就是會了解決所有疑難雜症的產物
我不入地獄誰入地獄 Orz
(這篇欠很久了一直沒有寫上來,因為懶沒時間)
[原因]
通常無法實機部屬是由以下原因導致的
Certificates (憑證檔)
- Key (私鑰)
Provisioning Profiles (提供描述檔 )
- App ID (Bundle Identifier)
- Devices (裝置)
- Certificates (憑證)
[檢查順序]
1.該專案使用哪個 Provisioning Profiles
可參考 [iOS]Code Signing Identity 無法選擇需要的 Provisioning Profiles
2.該專案設定的 Bundle Identifier 是否正確
可參考 [iOS]Code Signing Identity 無法選擇需要的 Provisioning Profiles
3.Provisioning Profiles 有沒有包含您的憑證
可參考 [iOS]Code Signing Identity 無法選擇需要的 Provisioning Profiles
4.憑證是否有效
可參考 [iOS] iOS Provisioning Portal Certificates
5.Provisioning Profiles 有沒有包含您的裝置
可參考 [iOS] A valid provisioning profile for this executable was not found.
[常見問題]
Q. 無法選擇需要的 Provisioning Profiles
請參考 [iOS]Code Signing Identity 無法選擇需要的 Provisioning Profiles
—————————————————————————-
Q. A valid provisioning profile for this executable was not found.
請參考 [iOS] A valid provisioning profile for this executable was not found.
—————————————————————————-
Q. 編譯失敗錯誤訊息 CodeSign error: code signing is required for product type ‘Application’ in SDK ‘iOS 6.0′
A. 沒有設定 Code Signing Identity
—————————————————————————-
Q. 使用XCODE 更新Provisioning Profiles 資料失敗
Your team has no devices for which to generate a provisioning profile. Please connect a device to use for development, or manually add a Device ID using the Provisioning Portal.
https://developer.apple.com/devcenter/iOS
Q. 使用XCODE 更新Provisioning Profiles 資料失敗
Your team has no devices for which to generate a provisioning profile. Please connect a device to use for development, or manually add a Device ID using the Provisioning Portal.
https://developer.apple.com/devcenter/iOS
A .開發帳號內找不到任何一台裝置 只要設定一台裝置即可正常
—————————————————————————-
Q. 編譯出現憑證錯誤
Code Sign error: Certificate identity ‘iPhone Developer: XXXXXX (XXXXXXXXXX)’ appears more than once in the keychain. The codesign tool requires there only be one.
A. 代表 MAC 裡有重複的憑證存在
鑰匙圈存取 -> 登入 -> 刪掉舊的重複憑證(訊息顯示的那個) 就行了
公用密鑰與專用密鑰都要刪