CFBundleShortVersionString must be a period-separated list of three non-negative integers

When I submit an application to the application store, I get this error:

enter image description here

Here is the relevant part from my info.plist file:

<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.0.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1.0.0</string> 

enter image description here

When I submit the application, you can clearly see that there is no version 1.0.0.pre .

enter image description here

I also use CocoaPods.

How to solve this problem?

Update: this is what I am trying to use in my project path: find . -name "*.plist" -exec grep -o -A 1 "CFBundleShortVersionString" {} \; find . -name "*.plist" -exec grep -o -A 1 "CFBundleShortVersionString" {} \; and here is the result:

 CFBundleShortVersionString <string>1.0.6</string> CFBundleShortVersionString <string>1.0</string> CFBundleShortVersionString <string>3.3.4</string> CFBundleShortVersionString <string>1.5.5</string> CFBundleShortVersionString <string>2.0.2</string> CFBundleShortVersionString <string>0.7.0</string> CFBundleShortVersionString <string>0.0.9</string> CFBundleShortVersionString <string>1.2.2</string> CFBundleShortVersionString <string>1.6.0</string> CFBundleShortVersionString <string>1.7.2</string> CFBundleShortVersionString <string>2.0.0</string> CFBundleShortVersionString <string>1.3.2</string> CFBundleShortVersionString <string>1.4.1</string> CFBundleShortVersionString <string>1.0</string> CFBundleShortVersionString <string>0.9.1</string> CFBundleShortVersionString <string>0.2.3</string> CFBundleShortVersionString <string>1.0.0</string> CFBundleShortVersionString <string>3.7.3</string> CFBundleShortVersionString <string>0.15.0</string> CFBundleShortVersionString <string>1.0.0.pre</string> CFBundleShortVersionString <string>2.3.0</string> CFBundleShortVersionString <string>2.0.0</string> CFBundleShortVersionString <string>1.2</string> CFBundleShortVersionString <string>3.0.2</string> 

Update 2: Run: xcodebuild > build.log I get the following error:

 2015-10-25 22:02:52.653 xcodebuild[6273:1043943] [MT] PluginLoading: Required plug-in compatibility UUID 7265231C-39B4-402C-89E1-16167C4CC990 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/VVDocumenter-Xcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs ** BUILD FAILED ** 
+5
source share
4 answers

Check 1:

You can search for the โ€œversionโ€ in the build settings. In case of strange situations, I usually use this "view":

  • Go to build settings.
  • On the left side of "Basic All", select "All"
  • On the left side of Combined Level, select Level
  • In the search field, enter "version" and press "return / enter"

In my MacOSX test project, it looks like this:

Version Settings

Note that there is an entry named "version name suffix". I am not sure whether this exists in the iOS project (will be tested later). In any case, you can view the settings that are โ€œeasilyโ€ related to the โ€œversionโ€.

Check 2:

Alternatively, you can grep the project file:

 grep pre MyProject.xcodeproj/project.pbxproj 

Check 3:

Open a terminal and in the project directory call this:

 xcodebuild clean xcodebuild > build.log 

with cocoapods, this is probably:

 xcodebuild -workspace PRJ.xcworkspace -scheme PRJ clean xcodebuild -workspace PRJ.xcworkspace -scheme PRJ > build.log 

In build.log find "ProcessInfoPlistFile". In my case, it looks like this: (manually wrapped - the actual name of the project has been changed)

 ProcessInfoPlistFile build/Release-iphoneos/PRJ.app/Info.plist PRJ/Info.plist cd /Users/fsc/prj/PRJ export PATH="/Applications/Xcode.app/..." builtin-infoPlistUtility /Users/fsc/prj/PRJ/PRJ/Info.plist -genpkginfo /Users/fsc/prj/PRJ/build/Release-iphoneos/PRJ.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -additionalcontentfile /Users/fsc/prj/PRJ/build/PRJ.build/Release-iphoneos/PRJ.build/Main-SBPartialInfo.plist -additionalcontentfile /Users/fsc/prj/PRJ/build/PRJ.build/Release-iphoneos/PRJ.build/LaunchScreen-PartialInfo.plist -additionalcontentfile /Users/fsc/prj/PRJ/build/PRJ.build/Release-iphoneos/PRJ.build/assetcatalog_generated_info.plist -o /Users/fsc/prj/PRJ/build/Release-iphoneos/PRJ.app/Info.plist 

Note the -additionalcontentfile . Check which additional files are listed and check them.

Check 4:

Browse the IPA archive to see where "1.0.0.pre" is located. For this open "Window> Organizer" select your application and click "Export ...". Select Save to Deploy the iOS App Store. The result is a .ipa file. Rename it to PRJ.ipa.zip - then you can unzip it. Find the .plist files and check their contents.

+5
source

Location of version numbers

Since you do not see a line in your project, most likely it is a bunch, frameworks or libraries related to your project. From the top directory in your project, you can use find in addition to grep to find the culprit:

 find . -name "*.plist" -exec grep -iq "CFBundleShortVersionString" {} \; \ -exec grep -Him 1 "1.0.0.pre" {} \; 

This may return results that may resemble something like:

 Binary file ./FooProject/Foo.framework/Info.plist matches ./FooProject/Resources/Info.plist- <string>1.0.0.pre</string> 

As a result, the results are returned, then you will find the reason " ERROR ITMS-90096 This package is not valid. Value for key CFBundleVersionShortString ... ". If the return result is within the Framework, as shown in the first result above (for example, a Binary file ) or another package / library, then you will need to change the value within a specific project (assuming that this is simply an error in the version number). You can also create a cleanup script to replace the value at build time before signing the code.

1.0.0.pre

However, more important here is why your application was rejected and which version 1.0.0.pre was created specifically for this. Using a version tag that purposefully rejects your application is designed to prevent you from using the pre-order code in a production application - by design. The person who created this particular block, package, framework, library, tells you:

"Do not use this preliminary code in the application that you plan to deploy to the public."

I would suggest not just changing the version number of the .plist elements .plist that your application .plist successfully, instead check the stable release version intended for production.

Several Info.plists

Frames, containers and packages have their own .plist numbers and versions. They do not "redefine" the number of your main version of applications, but simply have their own (one of which is clearly invalid).

+7
source

One of your third-party modules has a version number of "1.0.0.pre". It seems the error is related to it. The error does not say which plist, perhaps your assembly has more than one. For example, the subject in question creates its own package, for example.

0
source

Most likely, this is a problem with CocoaPods, do not change info.plist in your frameworks manually, follow these steps:

1) Add this script to the end of your subfile.

 post_install do |installer| app_plist = "MyApp/Info.plist" plist_buddy = "/usr/libexec/PlistBuddy" version = `#{plist_buddy} -c "Print CFBundleShortVersionString" #{app_plist}` version = `echo "#{version}" | tr -d '\n'` puts "Updating CocoaPods frameworks' version numbers to #{version}" installer.pods_project.targets.each do |target| `#{plist_buddy} -c "Set CFBundleShortVersionString #{version}" "Pods/Target Support Files/#{target}/Info.plist"` end end 

2) Update the path in the app_plist variable app_plist that it matches the path to the application .plist file.

3) Then run pod install .

This script changes all version numbers of Cocoapods frameworks in accordance with the application area, which is required from October 21, 2015.

0
source

Source: https://habr.com/ru/post/1234300/


All Articles