iPhoneアプリ申請時,Version Mismatch - CFBundleVersionや,CFBundleShortVersionStringとはなんぞや.

iPhoneアプリを提出しようとするとき,
Validateを行う.
このときに,Version Mismatchのような
エラーがでた.

これを押し切ってWaiting for Reviewまで持って行くと
以下のようなメールが来る.

Dear developer,

We have discovered one or more issues with your recent delivery for "TweetSwan". Your delivery was successful, but you may wish to correct the following issues in your next delivery:

Version Mismatch - Neither CFBundleVersion ['5.2'] nor CFBundleShortVersionString ['5.2'] in the Info.plist match the version of the app set in iTunes Connect ['2.1'].
If you would like to update your binary for this app, you can reject this binary from the Binary Details page in iTunes Connect. Note that rejecting your binary will remove your app from the review queue and the review process will start over from the beginning when you resubmit your binary.

これは,AppleStoreに表示するために設定したバージョンが
iTunesConnectと,Xcode上(つまりinfo.plistのCFBundleShortVersionString)で異なる
という意味だ.

iTunesConnectには,リリース(AppStoreに表示する)用に
バージョンを記述する.
例)上のメールの場合,2.1に設定している.

info.plistには2つのバージョンを記述する.
・CFBundleVersionー開発用
・CFBundleShortVersionStringーリリース用
例)上のメールの場合,両方5.2に設定している.

このCFBundleShortVersionStringとiTunesConnectのバージョン番号が
一致すればOK

引用:

CFBundleVersion (String - iOS, OS X) specifies the build version number of the bundle, which identifies an iteration (released or unreleased) of the bundle.

CFBundleShortVersionString (String - iOS, OS X) specifies the release version number of the bundle, which identifies a released iteration of the app.


参照:
https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102364