Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4.0 validation error CFBundleVersion

Tags:

xcode

iphone

ipad

I am trying the Update my iPhone/iPad Application which I had created in Xcode 3.x version.

I have added CFBundleVersion and the other in my Info.plist and I have crossed checked every thing but I am still getting the error which is following below.

This Bundle is Invalid. The Info.plist file is missing the required key: CFBundleVersion (1091)

I am getting it again and again and I have checked the CFBundleVersion which is already in my Info.plist file.

Please help me out

Thanks

Following below is the Info.plist file. I have crossed check it several times

<?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>
like image 402
Durrab Jami Khan Avatar asked Oct 09 '11 07:10

Durrab Jami Khan


4 Answers

I had the same problem. I solved it this way. In XCode 4.2 click on the Target. In the summary section, you will see a version and a build number. If you set them both to the same thing, it works. If you just set the version only and ignore the build field you will get the error. This fixed the problem for me.

like image 60
Ed Fernandez Avatar answered Nov 16 '22 19:11

Ed Fernandez


Sounds like something went wrong in the transition from 3.x to 4.0 A few things to check:

  • In the Project Target Build Settings make sure that "Info.plist File" is pointing to the right file.
  • Check that the Version field in the Project Target Summary is the right value
  • There should actually be two entries (by default) these days: CFBundleVersion and CFBundleShortVersionString though I doubt that's the issue
  • Make sure you don't have a space before or after "CFBundleVersion"

Else, you should be able to paste your plist here. In Xcode right-click on the plist file and choose Open As > Source Code. That'll give you the raw-xml that you can paste into your question (edit your question to update it).

like image 32
Wex Avatar answered Nov 16 '22 20:11

Wex


In my case the CFBundleVersion is composed of the subversion working copy revision number on build. This is done by a script that is found under:

Target -> Build Phases -> Run script

After checking the build log it turns out that the subversion binaries Xcode uses are different from the ones I use on the command line (MacPorts version). The received error is:

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

After modification of the line below:

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

to:

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

everything works fine again.

like image 1
Joey Avatar answered Nov 16 '22 19:11

Joey


I had that problem too. Here is my solution:

  1. Follow the directions Here
  2. Click Product > Clean
  3. Click Window > Organizer
    1. Click Archives
    2. Click Validate
like image 1
Joseph L Avatar answered Nov 16 '22 19:11

Joseph L