Error while uploading binary to app store - ios

I'm trying to upload binary to app store but i got the below issue.
"Your account already has valid distribution certificate."
But i have valid distribution certificate. This is happening while uploading new app as well as uploading new version of old app. I tried with XCode 6.1 and 6.2 beta. I also tried with multiple machine. I don't know for which cases this error will be shown.

This will happen when you have already generated a distribution certificate, and the distribution certificate that you have used to sign the application is different from the one that is present on Apple Developer Portal.
Try revoking the certificate in the Apple Developer Center, then go to XCode, Preferences, Select your Apple Id which has enrolled to the developer program, Click "View details", then Click on the "+" button and click on "iOS Distribution".
Then refresh the Provisioning profiles. Make sure you are connected to the internet. I am hoping that this will fix the issue.

Related

Do I need an iPhone for TestFlight? [duplicate]

I have enrolled to Apple Developer Program to release my first app. My app's bundle ID is the same at developer.apple.com, at appstoreconnect.apple.com and in my XCode project. However, XCode still gives the error in "Signing & Capabilities" tab:
Failed to create provisioning profile.
There are no devices registered
in your account on the developer website. Plug in and select a device
to have Xcode register it.
And another error:
No profiles for ‘com.xxx.yyy’ were found
Xcode couldn't find any iOS
App Development provisioning profiles matching ‘com.xxx.yyy’.
First error message made me think that a physical connection to an iPhone is required to create a provisioning profile.
I have never connected a physical device to my Mac before. I made my tests by iOS simulator. I was planning to do my physical device testing via Testflight.
Do I have to physically (via a USB cable) connect an iPhone to my Mac in order to create a provisioning profile? If not, what might be wrong?
Is it required to have provisioning profile in XCode to be able to use Testflight or publish an app to App Store?
Do I have to physically (via a USB cable) connect an iPhone to my Mac in order to create a provisioning profile?
Yes, if you want to use automatic signing. An automatic provisioning profile unites a computer and a device and an app; it says that this computer is allowed to build this app onto this device. Until Xcode sees the device, it can’t create the profile.
The alternative is to switch to manual signing. It’s more work but now you can generate the profiles yourself.
You do NOT need a physical iOS device (iPhone or similar) to upload an app to App Store! Whether for real or TestFlight.
I realize this qn is old now, but I'm writing this for people like me, who stumble in here fighting the same problem... 😏
What you need to upload apps on App Store:
A MacOS machine (not too old)
A paid Apple Developer Account
An app signing certificate from the above account
A provisioning profile, with or without a physical device
When trying to create a new provisioning profile in your Apple Developer Account, the first option is:
iOS App Development
Create a provisioning profile to install development apps on test devices.
See:
If you chose this option, you need a physical device! In fact, the way I understand it, you are supposed to register the UDIDs of ALL the phones and tablets that you want to test your app on...
If, like me, you don't have an iOS device, you can instead chose the last option in the list:
Developer ID
Create a Developer ID provisioning profile to use Apple services with your Developer ID signed applications.
See:
This one only requires an Apple Developer ID!
At the end of your create-provisioning-profile process, you have to download your profile and open it in Finder to install it (in XCode or whatever you're using). In your project, you have to switch from "automatic signing" to "manual signing". In XCode, this is done here:
If, like me, you had already downloaded your app signing certificate and installed it in your KeyChain app, you may run into this error when trying to apply your provisioning profile:
"Provisioning profile 'your profile name' doesn't include signing certificate 'your certificate name'".
The way I solved this error was:
In KeyChain:
Exporting my Apple Developer certificate to a .p12 file.
Deleting my Apple Developer certificates.
Re-importing the exported certificate file to keychain.
In XCode:
Close and re-start XCode
In the "Signing & Capabilities" tab in the project, de-select the newly downloaded profile and then select it again.
Now, it works! 🙂 From there, you should be able to follow any tutorial for uploading an app to App Store.

Issue while submit to app store - "you are already has a valid ios distribution certificate"

enter image description hereI am trying to submit my updated version of app to app store in my machine.
While exporting I am getting the error "Your account already has a valid iOS distribution certificate”.
Previously it was done by another person in one another machine, but i am not having the old certificate and provisioning profile.
I created the certificate and provisioning profiles, so all my code signing identities are on my machine. I'm able to run the app in device with the same certificate, I can create ipa in my machine and install the ipa in iPad its working fine, but unable to submit to app store.
I am using Xcode 6.3.2, Please anyone guide me on this.
Sounds like you may have created an additional distribution certificate. Login to your developer account manually and check this. If you do have two, then delete the older one (which I will assume was created by the previous developer).

Uploading app to client account in app store

This is my first time trying to upload app to app store, so I am completely lost. I have searched all over the web about the issue I am having, but could not find how to fix the issue.
Here is the problem:
I have developed an updated version for the existing iPhone app for client. Original version of app is already in app store for long time. Client wants me to upload new version of the app to their account in app store as "prerelease" for testing. They gave me their store account (admin role) username and password to log in. I added the account in Xcode and configured build settings to their team. But, after building the archive, when I click the "Validate" button and select their team, I am getting an error popup with the message "Your account already has a valid iOS Distribution certificate". I can't post images here, so here is snapshot image of the popup):
http://imgur.com/yLL5K1k
Apple troubleshooting documentation (documentation link here) shows that they should export developer profile and give me to import on my Mac. However, client say they don't have Mac and no Xcode, so they can't do it themselves. Apple documentation is mentioning another option - “Revoke and Request”, but I can't see that option. Also, if "revoke" is performed, will that affect client's application (more than 20 apps in app store)?
I have downloaded all of their certificates and profiles from Member center, imported to keychain, added account to Xcode, configured Xcode, but nothing helped.
Does anyone know what can I do, or ask to client, so that I can upload app to their app store account?
Thank you!
You must have downloaded the Distribution certificate from the account. That alone is not sufficient. You must get the private key from the client or developer who has created the certificate first or uploaded the application.
Log in to developer.apple.com portal, using the required credentials.
Click on "Manage your certificates, App IDs, devices, and provisioning profiles." under Certificates, Identifiers & Profiles
Then click on "Certificates"
On the new page Click on "+" button at right upper corner.
Now on this page select "App Store and Ad Hoc" under Production.
Then follow the instructions related to CSR file given on new page.
Note: Create new certificates with unique names so that you won't download old certificates to your mac, mistakenly.
For more info Distributing iOS Apps With iTunes Connect

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

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.

iOS app updated with iCloud passes validation during distribution, but the distribution profile is invalid in the developer portal

I have a strange issue.
I have a distribution certificate for my app in my developer portal with two App IDs (one wildcard and one explicit) and I've had to adjust the app ID to include the iCloud entitlements because I'm working on an update (iOS 7 only) with iCloud support.
I'm now ready to distribute and so I created a new provisioning profile in the developer portal with that certificate. As soon as it's added to Xcode, it shows up as "invalid" in the Developer Portal.
If I archive and validate my app before the app distribution in Xcode, and use my Apple ID and this provisioning profile, it says "it passed without any errors".
I'm extremely nervous about uploading this to Apple because it doesn't make sense to me.
The other provisioning profiles I have in the developer portal are the iOS Team Provisioning Profile (managed by Xcode).
I've got the entitlements in Xcode and my app works in development with iCloud, but I really want to distribute this.
If I add in more distribution profiles, as soon as it's added to Xcode, it shows up as invalid in the developer portal member centre. That's with using the explicit App ID. If I create one using the wildcard ID, it remains active, but I've read on the Apple documentation that for iCloud, you have to use an explicit App ID.
I have managed to solve this, thankfully.
I contacted the Apple Developer Support team by phone with this (without having to create a new support request and have that take a while) and was sent the following link:
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW34
The specific header is "Re-Creating Certificates and Updating Related Provisioning Profiles”,
basically went through and revoked all of my certificates in the portal and removed the certificate and private key in the keychain access. From there, I removed all of my provisioning profiles as well.
Within Xcode on the accounts section, I got a popup asking if the development and distribution certificates should be generated. I said YES and it did it. In the developer portal, I now had two certificates. I created a developer profile and tested my app; it worked. I then created a distribution certificate and added it to Xcode. After refreshing the portal, it still showed active. I archived and validated my app, with no issues and then uploaded. The new distribution profile is still active.
This was great and I'm happy to have this resolved.

Resources