2011-10-09 53 views
8

我正在嘗試更新我在Xcode 3.x版本中創建的iPhone/iPad應用程序。Xcode 4.0驗證錯誤CFBundleVersion

我已經添加了CFBundleVersion和另一個在我的Info.plist中,我已經越過了每一件事檢查,但我仍然得到下面的錯誤。

此捆綁包無效。該Info.plist文件缺少所需的關鍵:CFBundleVersion(1091)

,我一次又一次地得到它,我已經檢查了CFBundleVersion這已經是我的Info.plist文件。

請幫我

感謝

低於以下是Info.plist文件。我已經越過檢查了好幾遍

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
<plist version="1.0"> 
<dict> 
<key>CFBundleDevelopmentRegion</key> 
<string>en</string> 
<key>CFBundleDisplayName</key> 
<string>${PRODUCT_NAME}</string> 
<key>CFBundleDocumentTypes</key> 
<array/> 
<key>CFBundleExecutable</key> 
<string>${EXECUTABLE_NAME}</string> 
<key>CFBundleIconFile</key> 
<string>icon.png</string> 
<key>CFBundleIconFiles</key> 
<array> 
    <string>icon-57.png</string> 
    <string>icon-72.png</string> 
    <string>icon-144.png</string> 
</array> 
<key>CFBundleIdentifier</key> 
<string>com.my-irc</string> 
<key>CFBundleInfoDictionaryVersion</key> 
<string>6.0</string> 
<key>CFBundleName</key> 
<string>${PRODUCT_NAME}</string> 
<key>CFBundlePackageType</key> 
<string>APPL</string> 
<key>CFBundleShortVersionString</key> 
<string>1.3.5</string> 
<key>CFBundleSignature</key> 
<string>coRC</string> 
<key>CFBundleURLTypes</key> 
<array> 
    <dict> 
     <key>CFBundleURLName</key> 
     <string>Internet Relay Chat Server</string> 
     <key>CFBundleURLSchemes</key> 
     <array> 
      <string>irc</string> 
      <string>ircs</string> 
     </array> 
    </dict> 
</array> 
<key>CFBundleVersion</key> 
<string>1.1</string> 
<key>CQBuildType</key> 
<string>personal</string> 
<key>LSMinimumSystemVersion</key> 
<string>3.1</string> 
<key>LSRequiresIPhoneOS</key> 
<true/> 
<key>MVChatCoreCTCPVersionReplyInfo</key> 
<string>http://colloquy.mobi</string> 
<key>UIPrerenderedIcon</key> 
<true/> 
<key>UIRequiresPersistentWiFi</key> 
<true/> 
<key>UIStatusBarHidden</key> 
<true/> 
<key>UISupportedInterfaceOrientations</key> 
<array> 
    <string>UIInterfaceOrientationPortrait</string> 
    <string>UIInterfaceOrientationLandscapeLeft</string> 
    <string>UIInterfaceOrientationLandscapeRight</string> 
    <string>UIInterfaceOrientationPortraitUpsideDown</string> 
</array> 
<key>UTExportedTypeDeclarations</key> 
<array/> 
<key>UTImportedTypeDeclarations</key> 
<array/> 
</dict> 
</plist> 
+0

粘貼info.plist的內容在xml中很好。 – Robin

+0

它不讓我粘貼在這裏請幫助我,因爲我第一次使用堆棧溢出 –

+0

好吧 - 我正在添加我的info.plist和組織者屏幕截圖 –

回答

1

聽起來好像出事了從3.X過渡到4.0有幾件事情要檢查:

  • 在項目目標構建設置確保「 Info.plist文件「指向正確的文件。
  • 檢查的項目目標摘要版本字段是正確的價值
  • 有實際上應該是兩個條目(默認)這些天:CFBundleVersion和CFBundleShortVersionString雖然我懷疑這是個問題
  • 確保你不」在「CFBundleVersion」之前或之後沒有空格

否則,您應該可以將您的plist粘貼到此處。在Xcode中,右鍵單擊plist文件並選擇Open As> Source Code。這會給你可以粘貼到你的問題的raw-xml(編輯你的問題來更新它)。

+0

我已經完全添加了Info.plist,但我做了所有事情,但仍然出現Organizer驗證過程中出現此錯誤 –

+0

CFBundleShortVersionString與plist中的CFBundleVersion不同,我不確定這是否有所作爲。另外 - 是否在iTunes Connect中正確設置了版本號? – Wex

+0

它是以前一樣,我只是試圖用不同的數字來解決它在iTunes中的1.1和CFBundleShortVersionString是1.3.4, –

16

我有同樣的問題。我這樣解決了它。在XCode 4.2中點擊目標。在摘要部分,您將看到一個版本和內部版本號。如果你將它們都設置爲相同的東西,它就會起作用。如果您只設置版本並忽略構建字段,您將看到錯誤。這爲我解決了這個問題。

+0

這對我有效,謝謝 – Jay

1

在我的情況下,CFBundleVersion由build上的subversion工作副本修訂號組成。這是由下發現了一個腳本來完成:

Target -> Build Phases -> Run script

檢查構建後登錄原來的Subversion二進制文件Xcode的用途是從我的命令行(MacPorts的版本)上使用的不同。接收到的錯誤是:

REV=`svnversion -nc | /usr/bin/sed -e 's/^[^:]*://;s/[A-Za-z]//'` 

到:

svn: The path '.' appears to be part of a Subversion 1.7 or greater /.../

線下的修改之後

REV=`/opt/local/bin/svnversion -nc | /usr/bin/sed -e 's/^[^:]*://;s/[A-Za-z]//'` 

再次一切工作正常。

1

我也有這個問題。這裏是我的解決方案:

  1. 按照指示Here
  2. 請點擊產品>清潔
  3. 單擊窗口>管理
    1. 點擊檔案
    2. 點擊驗證