iTunes Connect CFBundleShortVersionShort must contain a higher version - ios

Today Xcode is giving me problems when attempting to upload a build to iTunes connect. It's giving me the following errors:
What's very strange is my application's CFBundleVersionShortVersionString is 2.0.0. I uploaded a build to TestFlight yesterday and it worked just fine. Then I did a search for CFBundleVersionShortVersionString, and I found a 1.0.0 and 0.5.1, but they were in the info.plist in the Pods. Why is this error all of a sudden appearing? I know I'm not supposed to change anything in the Pods. Has anyone come across this issue and if so how can you fix this?

It looks like there was an issue created for this same issue in CocoaPods - https://github.com/CocoaPods/CocoaPods/issues/4421
blixt mentions...
I think it's the iTunes Connect servers entirely, and not Xcode 7.0
nor Xcode 7.1. This issue appears to have started around 10 am PDT. It
is definitely a bug, and we fixed it by bumping our dependency's
Info.plist CFBundleShortVersionString up to the same version as our
app, and voila – iTunes Connect accepted the bundle.
This is an annoying fix but it seems like fixing the individual Info.plist files short version (that your dependencies may have) up to your app version should get you passed this error for now. This is definitely not a long term solution though.

Related

Bundle identifier is missing. x doesn't have a bundle identifier. Add a value for PRODUCT_BUNDLE_IDENTIFIER in the build settings editor

I'm trying to build a release version for IOS using Codename One but it keeps failing because of the product_bundle_identifier missing. I've deleted the .codenameone/iosCerts folder as per this Reddit thread but I still get the error.
The certificates look like they're generating okay but I have no way to find out.
I was able to build a version a week or so ago but I had to bump the version number after trying to upload my release in the App Store. It broke after that for some reason
Due to Shai's comments I went ahead and started from scratch using the Initializr. Once I imported my codenameone_settings.properties I started receiving the same error again. With some trial and error I figured out the codename1.arg.ios.plistInject I had somehow caused the issue. The app builds and works fine without that line being in there.

Failed to install the requested application [duplicate]

Yesterday, I've downloaded beta version of Xcode 11. After that, I've opened my project and tried to run with new Xcode. Unfortunately error has occurred with message:
Failed to install the requested application
Domain: NSPOSIXErrorDomain
Code: 22
Failure Reason: The application's CFBundleVersion is invalid.
Recovery Suggestion: Ensure your bundle contains a CFBundleVersion with a valid semantic version number.
--
I've closed beta version and tried to run again with latest stable version of Xcode (10.2.1), but the same error has occurred. I need to mention that before attempting to run a project with Xocde 11, it worked without any problems on Xcode 10. Nothing has been changed before and after running with beta Xcode.
What I've already tried:
I've removed Xcode 11 beta
I've cleaned my project and pulled it from latest branch
I've completely removed Xcode 10 from:
~/Library/Caches/com.apple.dt.Xcode
~/Library/Developer
~/Library/MobileDevice
~/Library/Preferences/com.apple.dt.Xcode.plist
/Library/Preferences/com.apple.dt.Xcode.plist
/System/Library/Receipts/com.apple.pkg.XcodeExtensionSupport.bom
/System/Library/Receipts/com.apple.pkg.XcodeExtensionSupport.plist
/System/Library/Receipts/com.apple.pkg.XcodeSystemResources.bom
/System/Library/Receipts/com.apple.pkg.XcodeSystemResources.plist
And then installed fresh stable version 10.2.1
I can run other projects which was not tested with Xcode 11 without any problems.
My last idea is to just reinstall macOS, but I would like to don't do it.
Edit: I’ve forgot to mention that application is working on physical iPhone XS.
There is a lot of misinformation in the answers here, so I wanted to provide an authoritative response.
The issue here is that the new version of CoreSimulator.framework with Xcode 11 beta does validation on CFBundleVersion that previous versions did not do. These checks are valid, and it does represent an issue in your application, but there's also a bug in how the checks were performed in Xcode 11 Beta 1 which compounds the issue.
First, fix the CFBundleVersion in your Info.plist. It should consist of only numbers and up to two periods (ie ##.[.##[.##]], eg: 12.4.2).
Second, after fixing CFBundleVersion, you need to killall -9 CoreSimulatorBridge because the old value is unfortunately cached in CoreSimulatorBridge, preventing it from recognizing the new value. This part was a bug, and it was addressed in Xcode 11 Beta 2.
Happened to me too, wasted almost an entire day scouting for possible causes.
The steps that finally fixed the problem and allowed me to install on simulator:
Quit Xcode and iOS Simulator
Remove /Library/Developer (the one from root), or rename it if you want to keep a backup
Relaunch Xcode, agree with the installation of command line tools
Continue work where you left over :)
Besides the steps mentioned in the question (fully uninstall Xcode 11, fully uninstall Xcode 10 and reinstall it afterwards), I also tried cloning the project in another location, circulating through all possible locations for derived data, installing other simulator runtimes and trying on those. None of them worked, luckily the console log app shown the path for the process that rejected the app bundle, it was one of the binaries installed by Xcode in /Library/Developer/PrivateFrameworks/CoreSimulator.framework.
Seems that Xcode 11 installed a newer version of the frameworks, and Xcode 10 was not overwriting them. Removing the whole /Library/Developer folder triggered the command line tools installation, which finally brought back the simulator runtime that properly worked in Xcode 10.
You gotta love the betas :)
I went to targets and found "Version" field is empty, just fill a number, for example 1.0
I had the same problem.
I find the Xcode 11 Beta Release Notes had explain it.
Bundles without a CFBundleVersion are invalid and can’t be properly installed on
devices or simulators. CoreSimulator now checks and rejects such bundles earlier in
the process with a clearer error message. (49892531)
And this link is the format of CFBundleVersion.
When I resolved this problem, I found out if having the CFBundleVersion problem when running App for the first time. Then it always has problem no matter whether the format is correct or not. So I restart the Xcode and the Simulator, and change the CFBundleVersion to a correct format, the App running correctly.
Combining Sgeven.Zheng and Cristik's answers.
CAUSE
Installing Xcode11 Beta installs a new version of CoreSimulator.framework with the following update:
https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_release_notes
"Bundles without a CFBundleVersion are invalid and can't be properly
installed on devices or simulators. CoreSimulator now checks and
rejects such bundles earlier in the process with a clearer error
message. (49892531)"
The following won't fix the issue:
Uninstalling Xcode11 Beta
Uninstalling and reinstalling Xcode 10
This is because CoreSimulator.framework is installed in /Library/Developer/PrivateFrameworks/CoreSimulator.framework, which is outside the Xcode.app bundle.
When re-installed, xcode10 detects that the currently installed version of CoreSimulator.framework is newer than what xcode10 would have installed, so it leaves it as-is.
SHORT-TERM FIX
Uninstall xcode11
Install Xcode 10 (No need to re-install if it's already installed)
Remove /Library/Developer/PrivateFrameworks/CoreSimulator.framework
Launch Xcode 10 and agree to install command line tools
LONG-TERM FIX
Since this is not a "real" bug but is instead the intended behavior of Xcode11, steps will eventually need to be taken to ensure that apps are always built with a valid CFBundleVersion.
In my case, the "Build Version" field on my target was empty, I changed it to 1 and the app was able to install.
Hi I've resolved just now with this:
I had in my info.plist only this key:
<key>CFBundleShortVersionString</key>
<string>2.1</string>
... and so now all works adding this:
<key>CFBundleVersion</key>
<string>2.1</string>
with the simulator that works again....
NOTE: without CFBundleVersion my app had worked perfectly on physical device!!!
It's a new feature in Xcode11.
In release note it said:
Bundles without a CFBundleVersion are invalid and can’t be properly installed on devices or simulators. CoreSimulator now checks and rejects such bundles earlier in the process with a clearer error message. (49892531)
You can:
Edit your CFBundleVersion by the style of this LINK
Reset your Xcode and simulator
Run again, you will see it works again
When you run app in simulator success, you can change back your CFBundleVersion again, you will found it still can work XD
If you get the following
running error.
(* see the attached screenshots below)
This is how you can to solve this issue.
Done in few steps.
Step 1) Go to your project navigator in Xcode.
find the info.plist then select it
Step 2) In the info.plist.
Select the (Bundle Version) field.
Change it is value to a single digit, from (4.0) to (4) instead.
by removing any decimal period.
Step 3) Add a * (Bundle versions string, short) below the (Bundle Version)
// Hint: Select the + sign to browse it if necessary .
Step 4) In the Value field (String), add the version, but with decimal period this time.
So if the (Bundle Version) is 4, make sure to add a period to it 4.0
See this picture for guidance.
Step 5) Build Succeed.
Happy Coding :-)
Adding onto this, I noticed that if your CFBundleVersion does not spec out to:
This key is a machine-readable string composed of one to three period-separated integers, such as 10.14.1. The string can only contain numeric characters (0-9) and periods. it will not build on simulator
link
In my case it was running the simulator/coresimulator version for 11 beta vs the one for 10.1 -> Killing and letting Xcode reopen the simulator solved the problem.
In my case, the Build Version field was empty. I added the value there but still it didn't work. I tried killall -9 CoreSimulatorBridge command and that also didn't help.
Finally when I checked the xml of the info.plist (Open as -> Source code), the CFBundleVersion key was not present and the version was displayed in the info.plist through CFBundleShortVersionString.
I just added the CFBundleVersion key as given below in the info.plist and it worked.
<key>CFBundleVersion</key>
<string>$(MARKETING_VERSION)</string>
I hope it helps someone else too.
I ran into this same issue as well.
I didn't get so far as to trying some of the other options provided here, but I was able to get back to building for simulator by simply deleting the /DerivedData directory.
If you're unsure as to where to find it, simply do this:
Xcode -> Preferences -> Locations
and select the arrow next to the path for Derived Data
I was confronting this problem yesterday. The situation is that I pull my code from git and tried to compile, after that, I may not able to run my app on the simulator (Or archive app to submit to the app store, the version number has not been put into archive info list, no version information as 1.3.4(123)). The error message is CFbundleVersion is not correctly setup. My Xcode version is 11.4 (11E146).
so I tried following the method:
Fix the CFBundleVersion in your Info.plist.(setup correct version format, numbers or X.X.XX)
change the Bundle identifier, for instance, add a prefix address com.example to com.example.test. Then try to compile and install the app on the simulator. Right now, you could see the app can install normally.
Then change Bundle identifier to your original one, such as com.example. Then try again, you will see you could install the app on the simulator or archive normally.
In Xcode Version 12.0 beta 3 I was having continuous problem launching the Simulator. I tried all the above mentioned techniques. Nothing worked.
I solved by adding this property to the Info.plist:
Bundle version string (short) and
setting its value to 1.0
See Image Here
I faced a similar issue for hours, this is what actually worked for me.
Navigate to the Resources folder
Find Info.plist
Add a key-value pair: CFBundleShortVersionString:
Clean Build Folder
Clear Device Cache
Run and Build
After upgrade from Xcode 13.2.x to 13.4.x my app archive started to show in organizer in section "Other items" not in "iOS apps". Also in organizer app has empty version. Build to iPhone was working, build on simulator failed due to error, that I do not have CFBundleVersion in Info.plist - but I had it there. I had fixed number (not variable) and it is root of problem. I had to change static values to variables....
File Info.plist
// OLD incorrect
<key>CFBundleVersion</key>
<string>345</string>
<key>CFBundleShortVersionString</key>
<string>1.2.3</string>
// NEW correct
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
File project.pbxproj
...
CURRENT_PROJECT_VERSION = 345;
MARKETING_VERSION = 1.2.3;
...
And additionally I had to add variables to file project.pbxproj to Release and Debug sections because I did not have it there. So with older Xcode it was working this way and versions was taken from Info.plist. Now it seems that source of true are variables from project.pbxproj but Apple have incorrect error messages because it is fail to say in error that CFBundleVersion is missing in Info.plist when it is there. Finally Xcode automatically deleted CFBundleVersion and CFBundleShortVersionString from Info.plist.
I have spent many many hours of finding out what is problem. I hate upgrading Xcode - nightmare, many hours always lost.

The encryption information is unavailable. Try again. TestFlight

The app is uploaded without errors, but when I press the install button I get this message:
I'm using macOS Sierra 10.12 and Xcode 8.
This has never happened to me in old versions of Xcode. What could be wrong?
TestFlight is currently unavailable, i can't either install from TestFlight or see any of my builds in Itunes Connect. Also my app was in processing for 4 hours, then this happened.
Please check here https://developer.apple.com/system-status/
or this screenshot
Update: Confirmed by Apple
I had the same issue. I never had an issue with setting or not setting the encryption flag. So I thought maybe they made a change today. So I added the key in and it still didn't work. I decided to remove the last build from testing then re-added it. That worked for me. I was immediately able to download and install the app. Hope that helps.
Build another version and upload to Itunes Connect.
Maybe your time uploading have some problem from Apple Server.
I have just checked.
Seems to be working for me this morning now. Incidentally Brad my app had GPUImage embedded in it so just for giggles I also added the "App Uses Non-Exempt Encryption." switch to the embedded GPUImage plist. Not sure if that was relevant.

iOS Builds: This build is invalid in iTunes connect

I recently uploaded an app to the app store and its been processing for a few days now. I went in this morning to check everything out, and on the top bar of iTunes connect, i clicked on iOS builds to see how everything was going and I got a red circle with an exclamation point in it. When I clicked on it, it says "This build is invalid". Does anyone know the cause of this?
Check your email, it tells you exactly what is wrong. In itunes connect it simply says "This build is invalid" which is kind of useless. If you check your email it will most likely be a testflight issue as you included the sdk in your build and its integrated into itunes connect now:
"TestFlight SDK - TestFlight no longer requires an SDK to enable beta testing, crash reporting and analytics. To continue using TestFlight, set up Beta Testing in iTunes Connect and remove references to the SDK from the following executables:"
I was facing the same problem. I solved it by good luck after couple of hours of struggle. This issue was due to cocoa pods. Actually I installed "Alamofire" through cocoapods versions "0.38". I updated the pods for Alamofire 3.1.2. This build successfully got uploaded to the itunes connect but was declared as invalid in itunesConnect.
This reason was Alomofire 3.1.2 required cocoapods version 0.39. But I updated it using 0.38. So it was the issue.
Fix: Normal updating cocoapods by using the cpmmand $ gem install cocoapods, and then updating alamofire would not fix the problem. You will have to :
1. Update cocoapods using $ gem install cocoapods.
2. Delete the existing pod references from your project.
3. Reinstall pods using pod install command.
4. Done
You could validate the app archive trough Xcode and get details of what is the problem. The archives are currently found under Window->Organizer. To validate it you can click the "Validate..." button under the "Upload to App Store..." button. This may help you if you didn't get an email with details for the problem as was my case.
I got the same problem too. and It turns out that I archive the build with Reveal framework reference. I think that's the problem.
In the pass, I made the same mistake and Xcode shows detail error info during uploading. Now it seems not.
I got the same problem too. I write a App with Objective-C and use ios-charts(is swift),and I need to support iOS7,so it is troublesome... and when I upload app to AppStore I get the problem. I submit it again ,but still the problem. then I despair to clean the project and reset the codesiganature,what... that work! I just hehele ... enter image description here
In my case I just Drag and Drop The SDK In folder include info.plist file which is not in use. That's create the issue for me. So find the unused info.plist file and delete it from the Source code. Clean the project folder and Re upload.
Recently I faced the same issue on iTunes Connect and I received an email from apple regarding to TestFlight SDK that I forgot to remove from my project bundle. It says 'TestFlight no longer requires an SDK to enable beta testing' so after removing SDK clean the code, make archive again and upload. That't it!

Non-public selectors in App?

I'm trying to submit an app via iTunes Connect. Xcode is throwing the following error:
iTunes Store operation failed.
The app referenced non-public selectors in Payload/Inflation Calculator.app/Inflation Calculator: allocBatch:withEntity:count:,allowWithEntity:, fastIndexForKnownKey:, indexForKey:
I have no idea what "non-public selectors" I would be using, because I stuck pretty close to the book with my code. Anyone have any ideas?
Code for the view controller (only .swift in my app):
https://gist.github.com/Calda/aefc2f19bae5f3cf2e54
EDIT: As a reference for the future, I confirmed with iTunes Connect Support that this was an issue with iTunes Connect and not a problem with my project. For anyone experiencing this same problem, my best advice would be to wait and try again later.
I had the same problem. I could not submit some of my apps because using non-public selectors. I also tried using Application Loader, but still the same error message
To solve the problem I installed Xcode 6.0.1 - it is still available to download here:
https://developer.apple.com/downloads/index.action
Before installing i moved the old Xcode to trash.
I can now submit any app.
I solved this by doing the following:
edit: I don't think the first step is needed
1) Cleaning the build folder (Hold Alt, Click Product -> Clean)
2) Deleting the Derived Data (Organizer -> Projects -> Select your project -> Delete Derived Data
The API differs between iOS 7 and iOS 8.
I got my App validated by switching to Deployment Target "8.0" - built with XCode 6.1.
It might not be the solution to all you guys but you could give it a try.
Might have happened to me because I recently started using UIAlertController -> seems to be an iOS-8-Feature. On iOS 7 this would be UIAlertView. So if you use some nifty new features they might not have been available with previous iOS versions - thus non-public API.
For the same app, I got this error today on XCode 6.1.
I submit the same app (little variation) 2/3 days ago with XCode 6.0.1 without any error!
Just updated XCode 6.1 and trapped with this error.
I switched back to XCode 6.0.1 and it do not have any problem with the submission. No non-public API usage error. I just download the dmg file and rename xcode.app to XCode_6.0.1. So it coexists with XCode 6.1.
I delete all derived data for xcode projects
/Users/{user_home_folder}/Library/Developer/Xcode/DerivedData
And app was submitted without any problem
I was running into the same issue that looked like an issue on Apple's end. I submitted the same app (v 1.0.1) yesterday, then rejected it, then submitted again today with a one-line code difference. Today's submission got rejected for the reason mentioned above.
I was able to solve this, using the latest versions of everything, by changing the version # of my app (e.g. 1.0.1 -> 1.0.2). Think this worked as I had a previous submission sitting in the queue for my older version that I had rejected, YMMV.

Resources