2013-08-05 28 views
16

增加了一些本地化後:Xcode中無法找到本地化的info.plist

enter image description here

和本地化(AppName)-info.plist文件:

enter image description here

並檢查包資源(也試圖刪除圍棋-info.plist從Copy Resources Bundle列表中:

enter image description here

和文件屬性:

enter image description here

的Xcode(4.6.3)給出一個錯誤:

error: could not read data from '.../Go/Go/Go-Info.plist': The file 「Go-Info.plist」 couldn’t be opened because there is no such file.

它看起來像Xcode中忽略的路徑定位文件夾。它試圖找到info.plist中爲:

.../Go/Go/Go-Info.plist 

代替:

.../Go/Go/(Localization)/Go-Info.plist 

我怎樣才能解決呢?

+0

我不知道,你可以定位一個Info.plist。如果你想本地化你的AppName你應該本地化infoPlist.strings文件並添加這些鍵:「CFBundleDisplayName」=「AppName」; 「CFBundleName」=「AppName」; – Toploulou

回答

39

我認爲Info.plist不能被本地化。如果您想您的應用本地化名稱,你應該本地化InfoPlist.strings文件,並使用這些按鍵:

"CFBundleDisplayName" = "AppName"; 
"CFBundleName" = "AppName"; 
+0

刪除鍵的雙引號,因爲它已經是NSString值了,對我很好。 – Itachi

+0

以下是供參考的Apple文檔:https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html#//apple_ref/doc/uid/TP40009254-102276 –

+0

謝謝指出Info.plist和InfoPlist.strings是兩件事情......我認爲很多像我這樣「聰明」的人會在本地化時忽略他們的差異。 –