The app couldn't be installed because developer certificate is no longer valid - ios

I have invited one TestFlight user from iTunes to test my app. The app is currently under review status. When that user tried to install the app, at the time of launching in iTunes, it throws the following error :
Could not install XXXX.
The app couldn't be installed because the developer's certificate is no longer valid. To resolve the issue, contact the developer.
Anyone can provide brief explanation what could be the reason for this and how it can be resolved.

I encountered this error because the build was signed using a provisioning profile whose certificate had been revoked.
When i checked in the developer center, the provisioning profile was marked as "Invalid".
I just clicked "Edit", selected the new developer certificate and regenerated the provisioning profile. When the new build was uploaded on testflight signed with the new provisioning profile, the error went away.
However, i do think Apple should be checking if the provisioning profile is still valid rather than developers finding it out after build is already approved by TestFlight and testers complain about this error.

It simply means that the developer account from which this app is uploaded is expired OR the development/distribution certificates of the app are expired or revoked. It can be resolved by activating the certificates of the app on apple's developer portal.

We have uploaded a version to apple-test flight and apple approved app for external testers. Now we're trying to download and is not working, got same message.
But if we run app from dev phone push notification works so P12 still valid. And distributed with old test flight process works.
We're trying to upload another version and see if works.

I try and try again until I read a comment on the apple forum:
This XC profile will be acceptable for upload, but is incompatible with Testflight
When you have to check provisioning profile, be sure any "XC" provisioning profile is selected (you can change it by clicking on the right arrow)
more details on the "goldstee" answer : https://forums.developer.apple.com/thread/18446

The error CLearly states what is wrong, your Certificate needs to be renewed, as your certificate may have expired or revoked, Try to create the Certificate again along with the provisioning profiles, and it will work fine

I had a slightly different issue which was a bit more puzzling as everything was 'valid'. I encountered the issue when I needed a production push certificate (which I already set 2-3 months before and tested!).
This is what I've done to resolve the issue:
Check xocde - both Code Signing and Provisioning Profile:
I had the correct settings (they matched what I was expecting and what I used for a previous build).
Check my apple developer account - it stated that my 'prod' profile was 'Active'
Check xcode -> prefrences -> provisioning profiles - I found the profile I could see in apple developer. It had the same expiry date too!
Wet back to my Apple Developer account, clicked on the profile, downloaded it and double clicked on it.
That fixed the problem for me.
If you encounter any issues, I suggest you check Parse guide (yes, I know they are shutting down but their doc is very good!). It covers more than just profiles but you can choose the step you are having an issue with.

In my case, I found everything is fine, both provisioning profile and certificates were valid.
What I did wrong is, I upload the build to TestFligth using Transporter app, which usually needs an .ipa for same but choose adHoc type instead of AppStore while exporting the binary in the organiser.
Which somehow allow the build to upload to TestFlight but didn't authorised to install on the user's device.
So make sure you're choosing the right option while exporting the build.

Related

Appcenter iOS install error "this app cannot be installed because its integrity could not be verified"

I see that this question has been asked many times but I see no solution that works for me so I'm hoping that providing more info might shed some light.
We use appcenter.ms to test iOS apps. Until our iOS certificate expired this method worked fine. We generated a new enterprise certificate and ad hoc provisioning profile for new releases of the iOS app. Which led to the first curiosity.
I see how to upload a certificate on appcenter.ms but not a provisioning profile. I thought there was an option to do this in the past but perhaps I am mistaken. However, the app is signed with a provisioning profile before upload, so perhaps this is not needed now.
Once the app is uploaded, it can't be installed. It remains grey and when you tap it, you get the "this app cannot be installed because its integrity could not be verified" error. Again, that the .ipa is created with an ad hoc certificate and profile in Xamarin (VS for Mac).
Also, I can't install the provisioning profile on a device from appcenter.ms. You basically get stuck in a loop where you seem to successfully install the profile but have to keep doing it because it never actually installs.
I hope this is enough info for some insight and thanks in advance for any feedback.
We were able to solve this by redoing and downloading development certs and via
And also downloading and double clicking the apple development certificate here
After that our keychain showed both as trusted and we could build to the iPhone again.
The issue can be the your device is simply not registered on the developer portal and/or that ad-hoc provisioning profiles have not been regenerated.
You need to register your device, regenerate a provisioning profile with this device in it and rebuild your app using this profile.
This can also happen because of
Developer ID Notary Service - Outage
which can be checked on https://developer.apple.com/system-status/
Notarization is well explained here:
Notarization gives users more confidence that the Developer ID-signed
software you distribute has been checked by Apple for malicious
components. Notarization is not App Review. The Apple notary service
is an automated system that scans your software for malicious content,
checks for code-signing issues, and returns the results to you
quickly. If there are no issues, the notary service generates a ticket
for you to staple to your software.
Work around fix:
Select your app.
Navigate to TextFlight tab
Create External Testing group
Add one tester
Add build which you want to download using TestFlight
Open TestFlight and download an app.
In my case this was caused by trying to include an entitlement for aps-environment "development" when using an Ad-Hoc provisioning profile. The value for this environment in Entitlements.plist must match what is hard coded into the provisioning profile file - if you open an Ad-Hoc profile in a text editor you will see it expects the "production" environment.
The possible solutions depending on your requirements are to either use the Development profile/certificate, or change the aps-environment to "production" to continue using an Ad-Hoc provisioning profile.
It can also happen if you have other incorrect entitlements - worth checking what entitlements are enabled under the Identifier in Apple Developer portal and removing unnecessary ones.
I had this issue because when building the app on xCode for distribution (Product->Archive then Distribute App), I chose automatic signing. After manually signing the app and choosing my own generated certificate and profile, everything worked again fine.
I removed the Entitlements file from the Addition Resources in iOS Bundle Signing and it worked.
I think the MSAL configuration was set to debug in entitlements.plist
I have also face this issue before but for me the reason was little different
First the build was enterprise one and the build was made on the earlier Xcode version on which the iOS version you are using on the device was not supported by the Xcode.
All I did was to update my Xcode and make a new build and shared the build. After that we were able to install that build over device Hope it works for you as well
This is how I solved for myself.
In you iPhone Settings > General > VPN & Device Management you should see your company name (if an app from it is installed), and if you click on it, you will see a button like "Verify" above the list of apps installed provided by the company. Just click on "Verify".

Problems with iOS Free Provisioning Profile

I've been using Xcode with a free Apple ID, and signing a App with a free provisioning profile.
However, after I signed the App with another Mac, the certificate on the first Mac I used to sign the App with does not work anymore.
I received this error message when I tried to run it on my iPhone:
Please verify that your device's clock is properly set, and that your signing certificate is not expired. (0xE8008018).
After generating a new certificate via Xcode > Preferences > View Details... > iOS Distribution > Create, I got this error instead:
The identity used to sign the executable is no longer valid.
After deleting the App from my iPhone, I tried to run the App again and received this error message instead. This also caused my phone to freeze for a while:
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /var/mobile/Containers/Bundle/Application/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/Test.app/Test
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/Test.app/Frameworks/libswiftCore.dylib: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/Test.app/Frameworks/libswiftCore.dylib'
(lldb)
Update: I'm using Free Provisioning Profile, thus I don't have access to iTunes Connect. I also can't import the certificate from my 2nd Mac as it was it was reset.
Update 2: I've also visited Keychain App and found 2 certificates - one expired and one valid. I deleted the expired one and tried to run the App on my phone again, but the error persists.
Update 3: I've tried to revoke all my certificates in developer.apple.com, but there isn't a certificates management. Only 'Programs & Add-ons' and 'Your Account' sections are available in the nav, which allows me to enrol into Apple Developer Program.
Update 4: I've also restarted my Xcode to no avail.
The main problem is that I'm not sure why I cannot revoke and regenerate a new certificate.
How can I solve this problem?
Generate a New CSR from your Keychain and download new certificate using this CSR. Include this certificate in your provisional profile and download it. Make sure you remove all expired certificates from Keychain. Good luck.
You don't need iTunes Connect to manage your certificates, IDs and provisioning profiles. iTunes Connect is used for managing your app store releases, which as you know you can't do with a free account.
You need to go to developer.apple.com and log in with your free account to the member center. You will be able to see the certificates and provisioning profiles under your developer account.
Since you don't have anything in the store (you can't with a free account), I would go into the developer's member center, revoke and delete any certificates that are out there, and delete all provisioning profiles. Start from scratch and generate a new certificate using a brand new CSR. Then generate a new provisioning profile using the existing app ID and the newly created certificate. Download the profile update your project settings to use the new signing identity and profile, and you're back in business.
Also, this is assuming that you are not sharing this developer account. If you are, doing the above instructions will make it so other developers will not be able to build with the signing identity unless you give them the private key for the certificate.
I managed to fix this problem by renaming the App name, and recompiling the App. I think that by renaming the App, a new certificate is generated, thus it would work.
Even though, it's not really a great solution, but it solved my problem as I wanted to rename the App in the first place.
Thanks everyone for providing answers!
I had to create a new Apple ID and it worked. Not the ideal solution but without access to certificates its the only solution that worked for me.

"TestFlight Users In The Provisioning Profile" doesn't coincide with users in the AdHoc provisioning profile

I have created a totally new TestFlight account, when I add the build to the account I see 79 users under TestFlight Users In The Provisioning Profile. The problem is that I have built the application using an ADHoc provisioning profile that contains just 3 devices, so why I'm seeing the full list of devices that I've registered with the Apple Developer Portal and not just the device that are available in the Provisioning profile (as stated by the sentence TestFlight Users In The Provisioning Profile) ?
I occasionally run into this problem and get it working again after trying a few things.
Restart Xcode. (It's amazing how often that solves the problem.)
Make sure that you are bundling the correct provisioning profile with the app when archiving and exporting. If you're using Xcode 6, the process has been changed a bit and you might be including the wrong profile. (Look in your Build Settings and then also look at the details on each screen as you are exporting the archive.)
Try re-generating your provisioning profile.
Make sure you have refreshed your account in Xcode so that it has the latest provisioning profile.
If those don't work, try creating a new signing certificate and generating your profile with that.
Then refresh your account in Xcode again.
If that's still not working, try removing your account from Xcode completely, restarting Xcode, and adding your account again.
Those are some of the tricks I use to get things working again. Maybe there is a more definitive answer out there.
I have also face the same problem.
This is because the provisioning profile you create from apple developer account.
Have that 79 devices register with that apple developer account.
Please check that account once.

Xcode 6 App Store submission fails with "Your account already has a valid iOS distribution certificate"

I'm using the latest XCode (6.1) and I need to submit the app as soon as possible, but I can't seem to get around the "Your account already has a valid iOS distribution certificate" error.
I have the client's provisioning profile and I have his distribution certificate (which is valid) and his private key (I've checked using Keychain, it's definitely there). The bundle ID is also correct. I've deleted my provisioning profiles and certificates and reinstalled the client's many times now.
What could be causing this issue? I've seen a lot of topics here on SO with this problem, so I apologise beforehand for creating yet another clone, but I really don't know how to fix this.
edit: I'm running a brand new install of Yosemite by the way
Got it solved by editing the iOS Distribution Provision Profile in the Developer Member Center.
For some reason there were 2 certificates to choose from for the Distribution Provisioning Profile. I switched over to the other certificate and I could Validate and Submit my Archive build for beta testing.
So, you may have more than one certificate for signing your Provision profiles. Make sure you have the right one (by trying all of them) and hopefully that should work.
I tried many things like Exporting Developer profile from Xcode Accounts and importing it in the organizer, installing the provision profiles from the member center, adding them to my keychain. But none of those worked. It started working only after editing the appropriate Provisioning Profile manually.
You could also trying removing all your available Provisioning Profiles and let Xcode create new ones for you. This will work too.
I also had this issue, which turned out to be caused by an attempt to export for ad hoc deployment using a development provisioning profile instead of a distribution profile. It seems this is no longer supported in Xcode 6.1. Once I created an ad hoc profile and installed that the problem went away. A more useful error message would have saved me hours of work and would be greatly appreciated, Apple.
This thread was helpful:
xcode 6 beta 2 issue with exporting ipa "Your account already has a valid iOS distribution certificate"
Besides all the other answers, there's one more possibility after 2/15/2016: the old World Wide certificate expired and I guess everyone has already downloaded the new cert (or check this out). However, you'll be seeing this error if you haven't remove the expired one. You may need to choose View -> Show Expired Certificates to unhide expired certs. If the error is still there, try regenerate provisioning profile as advised by the others.
I was moving to new Mac when I faced this issue.
On your older Mac:
Go Preferences > Accounts > Select Account > Details.
In the dropdown right click on iOS Distribution (or whatever is the name of your distribution certificate).
Export...
Set a password for the .p12 file.
Move and install this .p12 in the new mac.
Try Again.
Another possible cause for the problem (at least in my case) was that in my Keychain Access, I had two certificates for the team I was working with. One was expired, and the other one was the one I wanted to use. Deleting the expired certificate in Keychain Access solved the issue.
I ran into this problem, and I wanted to avoid screwing up my push notifications.
The easy fix for me was to just go to developer.apple.com > project > certifications, ids, and profiles > profiles > create a new profile (for development or distribution)
Download the created profile, drag and drop the profile over the Xcode icon, and then in your project target, set the new profile as the provisioning profile.
This fixed my problem--it may provide further help in the future.
The error message could mean that you need to get the Distribution certificate and private key from the developer who created them.
This can happen if some other team member has pressed the enticing "Reset" button (which means revoke certificate and create a new one).
Here is a picture what the revoked certificate looks like:
You can export the valid certificate from the developer who created
it and import it to other team members keychains.
Go to "Keychain Access" app.
Click on the "Login" in the top left box
Click on the "Certificates" on the bottom left box
Check which team member has the valid certificate:
when clicking on the "iPhone Distribution" certificate
everyone else sees "This certificate is revoked" in red at the top.
(Maybe backup the deleted certificate to avoid doing anything irreversible)
delete the revoked certificates
Export the one valid certificate and distribute to team
Import the certificate file for everyone else
Today I was solve problem by delete from keychain old certificate Apple Worldwide Developer Relations Certification Authority and install new one (exp. in 2023)
I'll add to here because while the accepted answer got me on the right track it wasn't the solution. There was a second (automatically created by Xcode) distro cert which I revoked. After doing that a new error came up. ("An App ID with Identifier '' is not available"... it also wasn't helpful) Eventually this lead me to the fact that my App Id in the member portal didn't have entitlements matching the build.
I solved this issue by editing the provisioning profile in the member center which is used in my app and re-install the provisioning profile.
I recently changed computer.
The reason for me was that I had several developer certificates in the Apple Developer member portal.
The solution was :
Go to Apple Developer Portal
Go Under Certificates -> Production
Click on "Revoke" for the oldest certificates and keep the most recent one
Revoking certificates won´t affect your Apple Store apps :).
I had this happen to me when I accidentally reset the certificate on another mac. Here's my scenario.
Mac1 - Had working certificate.
Mac2 - I accidentally reset the iOS distribution certificate
Mac1 stopped working and I get the message "Your account already has a valid distribution certificate"
The fix was
On Mac2, Keychain access -> certificates -> iOS Distribution certificate (for you/your company) -> export to p12 file (it will ask you to set a password)
Copy the exported file to Mac1
On Mac1, Keychain access -> certificates -> iOS Distribution certificate (for you/your company) -> delete (this is the old one that does not work)
On Mac1, double click the p12 file (then enter your password).
You should see a new iOS distribution certificate (for you/your company) in the certificate section of Keychain access.
This fixed the issue for me on Mac1.
Got it solved by deleting the provisioning profile which is managed by Xcode
(XC iOS Ad Hoc: *) from the member center

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.

Resources