iOS & XCode5 App publishing fails - Error ITMS-9000: "The binary you tried to upload was invalid" - ios

I was already looking through some other threads here with the ITMS-Error 9000, but they didn't help me to get my App passing the submission to the App Store.
I have NO errors or warnings inside XCode.
The App is perfectly working on iOS Devices & Simulators.
EDIT: What I have already tried:
Changed Deployment Target from iOS 7.1 to 7.0
Checked the Bundle ID in iTunesConnect and inside Xcode
Checked for any errors and warnings --- removed / fixed them
Do you have any additional ideas what it could be? Without any errors or further information it is hard to find out what the reason is.
UPDATE2::
If I try "just" to "Validate" instead of "Distribute" in the organizer after Archiviing it i get the following Error

Its an Issue with Apple's Server I tried validating the app it said "Unable to process app at this time due to general error" a quick search about it on SO said its got nothing to do with our code or project but some process running at Apples server

Assuming that your binary icons does not meet as per apple's human interface guidelines.

It most probably seems to be the issue with the profile you are signing your app with. You got to make sure that your are signing the app rightly with proper distribution profile. Also check out for the bundle identifier and make sure that it is same as the one you have given in itunes connect.
Check this link!

You should be creating the binary with the simulator or some device connected.
Try it:
Unconnect iOS device from your Mac,
Dont select any simulator, just leave it as it is, iOS device option
Archive it
Publish it
Make sure you're using a provisioning profile for the App Store (not for Ad Hoc distribution)
Then select this profile when building your app.

I would guess this all has something to do with Apple making system changes to prepare for iOS 8 and in doing so somethings got broken.
The issues look to have just been resolved by Apple. I just successfully submitted an app that was previous showing the same problem you had. If you look at your Provisioning Profiles, you should notice that Apple has removed your app's previous Distribution Profiles.
To get your submission working again, all you have to do is recreate your App Store and Ad Hoc provisioning profile, but make sure to use a new name and you should be good to go. You were not alone on this one. A bunch of people experienced the same problem and there were a lot of posts about it on the official Apple Dev forums.

Please check the Distribution Profile that you are signing your app with at iTunes Connects. make sure that it is still valid. I had same issue couple days back and after a struggle , i found out that somehow my provisioning profile was not valid anymore. Creating a new profile and submitting app with it solved my issue.

Apple have deleted corrupted provisionning, you just have to regenerate it and make submission works again !
Connect to your iOS Developer
Certificates, Identifiers & Profiles
Provisioning Profiles / Distribution
Here you can see some certificates missing. You have to re-create (Distribution / AdHoc). Note, you have to change certificates name !
In Xcode, refresh your certificates, set the right one in Build Settings, and submit...

I called today the Apple Developer Support and i get one very very simple answear to this issue.
You have to create all your certificates, provisioning profiles etc with Apples SAFARI browser.
It is not working "always" proper with Mozilla Firefox or other Browsers. So if you get such an error, try to recreate it with Safari! It worked like a charm!

Related

iOS app 'The application could not be verified' only on one device

I have two iphone devices( 4s and 5 ) connected to my computer and i am trying to install an application in both the devices. It installs pretty well in iphone 5 but it gives an error 'The application could not be verified.' when attempted to install in the iphone 4s device.
The UDIDs of both the devices have been added in the provisioning profile generated for the application.
Also, to add a note, I have just updated my iphone version to 8.1.3 in my 4s device. I am not sure though if the error has anything to do with it.
Any help on this would be much appreciated. I have been stuck on this for some time now.
EDIT:
I just connected this to another iPhone device and the issue seems to be there again. Basically this means that the app, for some reason, installs only in the phone which I have been using for some time now and not in any other phone. Once again, I am pretty sure that the provisioning profile contains the UDIDs of all these 3 devices.
I had something similar happen to me just recently. I updated my iPhone to 8.1.3, and started getting the 'application could not be verified' error message from Xcode on an app that installed just fine on the same iOS device from the same Mac just a few days ago.
I deleted the app from the device, restarted Xcode, and the app subsequently installed on the device just fine without any error message. Not sure if deleting the app was the fix, or the problem was due to "the phase of the moon".
As I notice The application could not be verified. raise up because in your device there is already an app installed with the same bundle identifier.
I got this issue because in my device there is my app that download from App store. and i test its update Version from Xcode. And i used same identifier that is live app and my development testing app. So i just remove app-store Live app from my device and this error going to be fix.
just delete the app and try again, it happens to me when i try to launch over a device that has the same app but generated by an ipa file.
You probably used the "Fix Issue" option in Xcode when plugging in a new device. Old question but I believe this is the actual answer to WHY this is happening. When you install an app on a device it is signed with a specific development provisioning profile. If, for instance, you plug in another device that is not registered on your developer account Xcode will ask you to "fix the issue". When you press that the device is added and another provisioning profile is created/modified. If you try to overwrite an existing app you'll receive that error. Deleting the app and reinstalling it works since the profile has been altered. I find this often happens when a Team is set and a member plugs in a new device then Xcode "Fixes" the problem.
Might have figured it out... Deleting the app from the device worked for me, as others mentioned before (thanks!).
I think the reason is that the app on the device was actually signed with a separate provisioning profile, specifically a distribution profile in my case.
I faced this issue a lot. I am not sure if this is the issue, but I think, when xCode saw that there is an app with the same bundle identifier as of the app, I am trying to install, it didn't allow me. So, I had to delete the older one and attempted to install and it worked. However sometimes for testing purpose, I needed multiple version of the same app and in that case, I would change the bundle identifier and try to install. It only works if, I am using an wildcard provisioning profile.
To others not using RubyMotion and don't think that deleting the app is acceptable (as in, you want to do upgrade testing). Check out the bottom of these docs from Apple:
https://developer.apple.com/library/ios/technotes/tn2319/_index.html
It looks like they changed something in 8.1.3 to check for this new rule.
The Fix
"[Add] the installed application’s application-identifier value, as logged in the second parentheses, to the previous-application-identifiers entitlement’s array value for the app being installed (by resigning it or re-building it) and requesting new special provisioning profiles as shown below."
<key>previous-application-identifiers</key>
<array>
<string>{Your Old App ID Prefix}.YourApp.Bundle.ID</string>
</array>
EDIT:
In order to do this, you need special provisioning profiles. You can request these from Apple:
"To enable signing with the previous-application-identifiers entitlement new special provisioning profiles are required that can be obtained by going to the Contact US page and requesting them." (from the docs linked above).
Had the same issue on my iPad running 8.1.3 Deleting the app and installing again fixed the issue. I use two different provisioning profiles on two different machines and that could have caused this issue.
Working & tested solution, which does not require to delete application:
It looks like AppStore Distribution Provisioning Profile or just iOS Distribution certificate have special permissions and "Could not be verified..." problem does not apply to them. They will always override previous certificate.
In other words: AppStore release will install successfully, even if already installed (testing, adhoc or enterprise) app has been signed by the certificate from different team.
If you are lucky and have previously uploaded app to the AppStore account owned by the same team as in certificate you have a problem with - then things are very simple: just download & install app from AppStore.
When it installs - app certificate will be the same as the one you want to test with and problem goes away.
If your app is not on the AppStore yet - iTunesConnect beta comes to the rescue:
Disclaimer: I did not tested this but since cert an prev are the same as AppStore release, I bet it works:
Archive your app with AppStore provisioning profile (iOS Distribution cert) and upload to iTunesConnect (to the account owned by the same developer team as included in the provisioning profile not you want to run).
Invite person with the device you want to run on (yourself?) to beta test.
Download & install the app from iTunes connect beta.
Now you are able to install your testing version.
The application could not be verified" , in your device there could be already an app installed with the same bundle identifier.
So Simple solution Just delete the App & try again..
....
TL;DR answer - There is no real solution besides "delete app and reinstall".
This answer is not satisfactory for many situations, when you have an existing database that needs to not get deleted within the app.
Lukasz and plivesey are the only ones with solutions that don't require delete, but neither worked for me.
I resolved this issue by changing the Build System to legacy in xcode.
I had the same problem but the mentioned solutions above didn't work for me. Even I had no previous app on device, I got this error when deploying on my device.
How to do:
Simply, go to menu File > Project Setting, inside Share Project Settings, change Build System from "New Build System (default)" to "Lagacy Build System".
I also encountered the same issue. Deleting the app didn't work, but when I tried deleting another app which was the current one's 'parent'(I copied the whole project from the previous app, modified some urls and images, then I clicked 'Run' and saw the unhappy 'could not be verified' dialog). Seems the issue is related to provisioning and code signing and/or some configurations of the project. Very tricky.
I had changed the team but I forgot to change it in my Tests target it so it caused that. Maybe this helps someone.
Just had the same problem and I found out that the issue is with expired certificate.
My app was distributed (AdHoc) through firebase and few days ago app was working just fine.
Today I've realized that I can't install it because 'The application could not be verified'.
Finally I realized that certificate that I was using for app signing has expired 2 days ago.
You need to upload it again and you'll be able to install it.
I had the same problem. But, I realised I was using a single plist with (debug) and (release) configuration, like this.
So, I changed few things..
Keeping a separate scheme for (release).
I added a new scheme for development purposes.
Edited the new scheme > run > Build Configuration > and set it to (release)
Generated a new archive using the new scheme and voila!!..
I'm able to install on all my devices.
My case:
jailbreak'ed iPhone
Final solution:
Install tweak AppSync Unified via Cydia
to bypass signing/certificate verification
Same issue occurred for me when I was installing through link. I tried to install using different link. Then I could install the app.

ITMS 9000: The binary you upload was invalid

When I ran into this issue, my first thought was to search Stack Overflow for solution. I did the search, found several topics. But, unlike my issue, those posters got some clue from the error such as,
App Store error: The binary you uploaded was invalid
Invalid iPhone Application Binary
Uploading Binary iPhone App "The signature was invalid" again again and again
The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate
Or this one:
"The binary you uploaded was invalid. the file was not a valid zip file" Error message uploading app to iTunes Connect
The binary you upload was invalid. the file was not a valid zip file
Or this one
CFBundleVersion in the Info.plist Upload Error
The binary you uploaded was invalid. The key CFBundleVersion in the Info.plist file must contain a higher version than that of the previously uploaded version.
But for me, I got nothing, it just says ERROR ITMS-9000: "The binary you uploaded was invalid"
I try to resolve this issue by the following attempts, all of them failed
Test on simulator make sure the app works ... Check!
Test on device (iPhone 5S, iOS 7 and iPhone 4s iOS 6) to make sure the app works ... Check!
Clean and build ... Done!
Make sure that I'm using distribution profile (not ad hoc, dev) ... Check!
Redo the whole process of certificate and provisioning profile ... Done!
Check my code signing identity ... Check!
Check bundle id, there are matches (Xcode == App ID in Apple Developer == App in iTunes Connect) ... Check!
App ID case sensitive check .... Check! (lower case, com.companyname.productname)
Delete target in project and then create a new one (I have one project, multiple targets) ... Done!
Delete scheme and then create new one ... Done!
Check icon size, check loading image size, check pixels per inch ... Check!
Check Localizable.strings for typo ... Check!
Delete build foler ... Done!
Restart Xcode, restart computer ... Done!
Connect to another wifi router ... Done!
Submit from my colleague Macbook ... Done!
Create new App ID, new certificate, new provisioning profile and update iTunes Connect Bundle ID ... Done!
Take a break for an hour, try again ... Done!
I really have no idea what did I do wrong. I've been submit app since iOS 4, hundreds of updates. But never ran into anything like this. In fact, I've just update another app yesterday which share the same codebase with this one, no issue at all.
Is there a way I can gather more information about "the invalid binary" Xcode is telling me? Or is there anything else I should try?
For everyone who found this topic (18 July 2014), maybe your best shot might be, taking a break for few hours (or a day) and try again.
--- Last Update ---
It turns out to be Apple Server issue
Says, I have an application called "Sample App"
This app has an app id of com.tartw45.sampleapp
This app use an App Store Distribution profile called "Simple App App Store Distribution Profile"
Back to last Friday (18 July 2014), everything seems ok, no indicator of any error but I couldn't publish the app as I stated above
Today (21 July 2014), I tried again with archive from last week, still no success.
I decide to redo the archive process and I found that "Simple App App Store Distribution Profile" is no longer valid
I login to developer.apple.com and found that "Simple App App Store Distribution Profile" also no longer there in the list of all provisioning profile. **
Then I try to create a new provisioning profile with the same name (Simple App App Store Distribution Profile) but there is an error says that this profile is already exist, please choose another name **
So, I create a new provisioning profile with slightly different name, refresh the provisioning profile in XCode, archive again and then publish .... Works!
So, It's definitely Apple Server issue and your provisioning profile (**), it has nothing to do with your XCode version or project setting (if you successfully submitted your app once before running into this issue with no reason). So, anyone who found this topic, please try to validate your provisioning profile and try to publish again.
I was having the same issue since last night and finally got it to work just now. Had to go through this process
Logged in on https://developer.apple.com> > Certificates, Identifiers & Profiles > Provisioning Profiles and revoked my company's Distribution Certificate.
Then Xcode > Preferences > Accounts > Apple IDs > (my company) > View Details and refreshed the certificates and Provisioning Profiles. It prompted that no Distribution Certificate was found on the Developer Profile and offered to request one on my behalf, which it did.
Launched Keychain Access > Certificates and removed all of the expired Certificates (somehow I had a few of them)
I went back to https://developer.apple.com> > Certificates, Identifiers & Profiles > Provisioning Profiles and edited all of my manually managed Provisioning Profiles (Development — which had to be re-generated — and Distribution — which had to be linked to the newly created Distribution Certificate and generated again)
Once again Xcode > Preferences > Accounts > Apple IDs > (my company) > View Details and refreshed the certificates and Provisioning Profiles.
Credit to Rodrigo on the apple dev forums
iTunes connect (or at least some services that iTunes Connect uses) are down for the moment, so "Take a break for an hour, try again ..." is your best shot. Apple of course doesn't update their status page until tomorrow or so.
https://developer.apple.com/system-status/
It's on Apple's side. I tried to validate a couple of apps that worked last night, no changes in code, credentials, or Xcode and this is what I get.
We found it wasn't necessary to revoke anything- when I went to Provisioning Profiles->Distribution, the two profiles for our two apps we were trying to release had been removed. I recreated those profiles (but I had to assign new names, using the old name led to a "profile already exists" message- so those identifiers are still out there- somewhere). Downloaded and installed the new profiles, resubmitted the archives we made on 7/18/14, and everything sailed right through.
Apple iTunes' Connect server is down at the moment. I have tried almost everything, but all failed.
I suggest as above to take some rest and try upload after an hour or so.
I ran into the same error when I tried validating my app. I got a message saying,
Unable to process app at this time due to general error
I searched on SO for this and only found a suggestion to wait for some time, as this is an error from Apple's servers. I tried all sorts of things, from playing with provisioning profiles to improving app performance and linking libraries, none of which resolved the issue. Unfortunately, I guess we don't have any other options than to wait and let Apple do its work.
Yesterday, I had to regenerate an expired distribution certificate and got errors each time. Now it works, but I got the invalid binary error. It looks like Apple have done some changes and missed up something.
There might be a link between a change in certificates yesterday and the invalid binary error today, which gives a possible explanation of this problem.
I've had the same issue and have found out that my Provisioning Profile for Distribution "somehow" disappeared from the Apple Developer Portal. But when I tried to re-create it, I received error message about the existing one (which I couldn't find at all).
Finally, I've just created a brand new Distribution Provisioning Profile, downloaded and installed it. In the end, I was able to validate the application package and upload was successful.
Just spent a while on this also, my upload previously worked and managed to get through validation.
However, once up Apple would fail/reject the uploaded binary due to something similar to the below
https://stackoverflow.com/questions/18952213/invalid-directory-name-your-app-contains-a-directory-name-that-is-already-rese#=
Upon retrying, later without making any modifications, rather then sucedding then failing after validation I started receiving an error exactly the same as the OP.
Fixing the framework reference issue, enabled me to succesfully upload.
So rather then uploading passing validation and then being rejected, it would not pass validation, and I give the same error, without any hints.
Hopefully this helps someone else.
In my case I updated my Mac version and it worked fine afterwards.

No .app bundle found in the package, while uploading with Application Loader

I know there are already several questions on the subject, but I am really desperate. I don't know what else to do than to look for an advice here.
So, I have an app ready to be uploaded.
I have checked all the pre-steps, before trying to upload:
Bundle ID matches in info.plist, iTunesConnect, Apple developer, Provisioning profile
Game works perfectly when I run it on the device, in app purchase works with a test user, and not a single issue appears
Here are some screenshots with some info:
What I have noticed is that there isn't any Provisioning Profile selected:
Yet, when I select the provisioning profile I made earlier, I get this error. When I clock "Fix" it changes it back to none provisioning profile selected.
I don't know if that's the cause of the trouble
All in all, this is the Error I get:
This is my first time that I'm uploading an app with in app purchase. So I might missed some obvious step. I really hope that somebody will see the problem here, because I've been trying to fight this for 2 days now :(
When you see "iPhone Developer" in the code signing identity, that means Xcode will automatically select a matching identity to sign the app (It doesn't mean that no profile is selected).
From what I can see it looks like "iPhone Developer" is chosen for both Debug and Release configurations which will likely cause a problem because you cannot submit a Developer signed app to the App Store, it must be signed with a Distribution certificate and Distribution profile.
You will need to ensure that you have created a Distribution Certificate and profile to sign your app with before archiving it and submitting it via Xcode.
I would recommend you read up on how app store distribution works from the Apple documentation here:
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/Introduction/Introduction.html
Then if you still are having trouble, read the trouble shooting guide from the docs here:
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/Troubleshooting/Troubleshooting.html
I have had a similar problem. We received an APP from an external provider and re-signed the APP ourselves using our own certificate and provisioning profile. When uploading the APP with Application Loader I received the error ITMS-90167: No .app bundles found in the package.
I have sierra installed on my Mac and I am using XCode 8.0 but had an old version of Application Loader (3.0) that was installed separately. Using this version of Application Loader I got the message. If I instead used the Application Loader that is part of Xcode (from the XCode/Open Developer Tool menu), ie version 3.6 everything worked out great and the ipa file was successfully uploaded to ITunesConnect.

Xcode 5 - Can no longer validate archives

I upgraded from Xcode 4 to 5 and I can no longer validate archives created for Ad-Hoc distribution.
After creating an archive, I hit Validate, log into iTunes Connect (as prompted) and get the error "No identities are available for signing":
If I click 'Download Identities...' then pick my team name (me) it just takes me back to this error prompt.
Specifics
I have created and signed an Ad Hoc distribution profile called 'survey_dist_9'
The Code Signing settings in my Target look like this, although I have tried many combinations of these profiles:
My unchanged, existing project that worked fine in Xcode 4 no longer works in Xcode 5. I validated 15 versions of my app without fail before upgrading to XCode 5.
In My Xcode organizer it shows no provisioning profiles except under my iPad device. Has this changed since Xcode 4? (Sure they used to be there)
There are similar sounding questions here but the solutions I've found are not applicable.
No crashes are occurring as described in similar sounding questions. I can distribute as Ad Hoc. The problem is we're using Ad Hoc as a production solution (distributing an in-house app to a small company) so I'm reticent to skip the Validation process.
Any suggestions?
Make sure that the bundle identifier in Xcode matches your App's bundle ID in iTunes connect.
Here you go, follow the screens below, it should help you..
And yes they have removed Profiles from Organizers, instead you can use iPhone Configuration Tool.
Hope it helps..
Cheers
It looks like Apple disabled the ability to validate with just an ad hoc provisioning profile in XCode 5.
If you wish to validate an app that is intended only for Ad Hoc distribution, you must also have an App Store provisioning profile for the app too, against which to validate it.

provisional profile is not found for the device

I know that it has been asked a thousands of times, but I am struggling 4 hours with every possible sollution I read but still I cannot beta test my app in my device.
Here are the facts:
1) My app is uploaded in the IOS store, so I have created a provisioning profile, app id's and so on. I just now want to test it in my iPhone4, with target iOS 6.0.
2) I added my device UDID in the devices, in my developer account.
3)I set the code signing for debug to my provisioning profile.
4) I plugged in my ios device in the mac and I see that picture.
As you can see there is no provisioning profile.
5)If I run the app to my ios device (which is listed in the Xcode) I get the error
No provisioned iOS devices are available with a compatible iOS version.
I tried so many solutions that I found that I cannot even remember all of them. I am following all the steps one by one.
-someone said to log out from developer account
-other said to change deployment target
-other said to change the "edit scheme" to debug.
Can anyone help me? I do not understand what is missing since app is published and I only want to test it in my device. Should I change anything else?
EDIT: I selected the device as Ganee said. Then in my organiser I see the following picture:
If I press refresh, I see "Too few items in team".
So If I remove the provisioning profile, how do I download the new one? I suppose I enter my developer account and press download in the distribution profile under the provisioning tag, right? But is this updated with the selected device?
Here is my picture from the developer account:
I think you followed all steps, but still you have to conform the following steps.
After you added device to developer account, you have to select that device in your provisioning profile.
Remove old profile from your organiser, download new modified profile and install it on your Mac.
Please check wether you modified developer/ distribution profile and select it on your xcode.
Hope this will give some clarity.
I remember having similar problem in the past. I am not sure if yours is similar. But awhile back when I upgraded my iOS device, it was no longer compatible with the xcode version I was running. I had to upgrade to the latest version of xcode. What is Xcode version are you running?
Finally the problem was that I had a distribution profile set up, and not a developer. Thanks for the help!

Resources