用 Xcode 5 編譯一個當初以 Xcode 4 寫的舊專案,提交 iTunes Connect 審核時被退回,收到如下通知:
iPhone 5 Optimization Requirement - Your binary is not optimized for iPhone 5. New iPhone apps and app updates submitted targeting iOS 6 and above must support the 4-inch display on iPhone 5 and must include a launch image with the -568h size modifier immediately following the <basename> portion of the launch image's filename. Launch images must be PNG files and located at the top-level of your bundle, or provided within each .lproj folder if you localize your launch images.
郵件講得很明確:凡是 targeting iOS 6 以上的新 App 或更新,都必須支援 iPhone 5 的 4 吋螢幕,並提供檔名帶 -568h 修飾子的啟動圖。啟動圖必須是 PNG,放在 bundle 的頂層;若有做在地化,則放在各自的 .lproj 目錄底下。
對照到專案,缺少的正是這三張圖:
Default.pngDefault@2x.pngDefault-568h@2x.png舊專案在建立時還沒有 4 吋螢幕這回事,自然不會有 -568h 那張;而另外兩張則是舊尺寸機型的啟動圖。少了這些圖,App Store 就判定你沒有為 iPhone 5 做優化。
補上缺少的啟動圖即可。幾個實務提醒:
-568h 必須緊接在 basename 之後、@2x 之前。