![](/img/trans.png)
[英]Xcode: How to add key into generated Info.plist file (or merge generated and existing Info.plist)?
[英]Why to add icons in info.plist file?
我在我的應用程序中添加了所需的圖標文件。 但是當我將應用程序上傳到應用程序商店時,它會向我顯示一個錯誤,說Bundle 不包含圖標文件 57*57但在我的應用程序中我已經有了它。
我在 Xcode 5 中開發了這個應用程序,然后我在 info.plist 中添加了圖標,因為在某些設備上圖標不可見。
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon76</string>
<string>icon40</string>
<string>icon40@2x</string>
<string>icon60@2x</string>
<string>icon40@3x</string>
<string>icon50@2x</string>
<string>icon50</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</dict>
那么為什么我們要在 plist 中添加圖標,因為在我最新的 xcode 7 項目中,我沒有在 plist 中添加圖標名稱,但它仍然上傳到了應用商店。
更新
<key>CFBundleIcons</key>
<dict/>
<key>CFBundleIcons~ipad</key>
<dict/>
在 plist 中使用上述代碼並嘗試運行它不顯示任何圖標
使用圖像資源並用各自的大小和分辨率填充所有圖標。 反過來,它會自動添加到 pList 中,就像 Xcode 自己做這部分一樣,就像在項目設置中添加 URL 方案時一樣,所有這些 URL 都由 XCode 本身添加到 plist 中。 在上傳到 Appstore 時,他們會檢查 plist 信息。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.