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

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.

Related

Wildcard App IDs can not be used to create In House provisioning profiles. Please use an Explicit App ID

I'm invited to a team to build an in house app. I'm granted as a team admin in Apple Developer Portal. The problem is that when I want to export the achieved app to a .ipa, it shows the message "Wildcard App IDs can not be used to create In House provisioning profiles. Please use an Explicit App ID." as the following screenshot. At the beginning, I login to Xcode/Preference/Account and download all provisioning profiles. Then I tried to login another account (who is able to export the .ipa) on Xcode/Preference/Account. Both trial lead to a same error message. Then I reset all my certificates and provisioning profiles on developer portal but in vain.
The interesting thing is that there's always a wildcard app id "*" on the developer portal, I tried to remove it manually but it comes back every time when I try to export the in house app.
I also tried the answers
Xcode 7.2: Failed to Locate or generated signing assets, Wild Card App IDs can not be used to create In House Provisioning Profiles
and this one
XCode export app, wildcard error
, nothing happened.
Any idea? Thanks for reading my question. I've already spend two days on this issue.....
Screenshot1
Xcode unable to create distribution builds for App Store submissions or Enterprise apps.
This issue occurs when the expired WWDR Intermediate certificate is present in both the System keychain and Login keychain within the Keychain Access application.
To resolve the issue, first download and install the renewed certificate.
Next, in the Keychain Access application, select the System keychain.
Select 'Show Expired Certificates' in the View menu and then delete the expired version of the Apple Worldwide Developer Relations Certificate Authority Intermediate certificate.
Your certificates should now appear as valid in Keychain Access and be available to Xcode. This issue is resolved in OS X El Capitan v10.11.4 beta.
from developer.apple.com

XCode export app, wildcard error

I am developing a Swift iOS app for in-house distribution and I am having trouble exporting the app - I get: "Wildcard App IDs can not be used to create In House provisioning profiles. Please use an Explicit App ID."
In the Member Center, I have created an explicit App ID:
In the Member Center, I have also created an iOS Provisioning Profile for Distribution:
In XCode, I have downloaded the distribution provisioning profile (under preferences > Accounts):
This is a Swift iOS app (my first) and I am trying to export the app (.ipa & .plist file), so that I can deploy it from an Intranet site. Note: I do not have an MDM (nor do I want to purchase one at this time). Xcode version: 7.2.1.
What am I missing?
Edit 2/15/2016: This SO Post is about a similar issue, but the steps outlined there did not resolve the issue for me.
I faced the same problem and almost spent one day to solve the problem.
When I encountered the problem, I thought it was an error related with invalid distribution certificate or provisioning profile. I renewed certificates and all other stuff. Nothing worked! Neither certificates nor provisioning profiles were the root cause.
I have seen an announcement on Apple Developer page. Apple's WWDR Certificate was expiring and newest one available on that page. I updated that certificate and it worked!
Steps you should follow:
Open Keychain Access and remove expired Apple Worldwide Developer Relations Certification Authority from certificates.
Download new certificate as suggested.
Be sure that Apple Worldwide Developer Relations Certification Authority is located under Systems keychain, not in login.
Open XCode (If already, close and then open)
Clean your project.
Select your valid signing certificates and provisioning profiles. (You don't need to refresh your certificates or profiles as annoucement suggested)
Hit Archive button!
Hope this may help someone else.

Error while uploading binary to app store

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.

Xcode 6 error when building app for release

I am having issues trying to achieve or even build a release build of an app I am working on. Whenever I try to build the app for release I get an error saying:
No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) were found.
I have the cert for this profile on my computer but in the Developer Portal I only have a certificate for development. Is this causing this error to occur? Do I need to have a Distribution cert to be able to build for release? Any help would be appreciated.
Note: I am a developer(team member) for a company so I do not have direct access to the Apple Developer Portal.
I know provisioning profiles are a pain :) This is what I do to stay organize and develop/distribute my projects:
The developer portal (not xcode) contains the most accurate source of profiles. For example, imagine you created a merchant certificate, turned on apple pay, and then generated a provisioning profile. Then let's say you decide you no longer want to use apple pay - the act of turning it off actually invalidates the provisioning profile. You will see a yellow "invalid" warning in the developer portal, but the provisioning profile may still be available in xcode! Really annoying. So I would always make sure that your provisioning profile is valid in the developer profile before distributing an app.
In the developer portal, always make sure you have two distribution profiles -- one ad hoc to use with testflight, and one to distribute to the apple store. You should also have one developer profile to build and debug your code.
Once you have your profiles set up, go into xcode and refresh the provisioning profiles as described here: https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingProfiles/MaintainingProfiles.html#//apple_ref/doc/uid/TP40012582-CH30-SW26. I.e. go to preferences, accounts, view details..., and click the refresh button on the bottom left hand corner.
Now that xcode's provisioning profiles are updated, you need to now code sign with the right profiles. To do so, go into your project settings, and go into build settings for both the project and the target. Under debug, select your iOS development certificate. Under release, select your iOS distribution certificate. Under provisioning profile, you will want to select your development profile just to build on your device and debug, your ad hoc distribution profile if you want to archive the project and send it via testflight, or your apple store distribution profile if you want to archive the project and submit it to the apple store.
A few things to note, is that when you are creating the provisioning profiles, you need to specify the certificate you are dealing with. So if you are creating one of the two distribution profiles, you will need to select your iOS distribution certificate. And when you select ad hoc distribution, will need to select the devices that you want to be able to distribute too. Testflight will help you register the devices that you want to distribute to, and once registered, you will be able to select those devices to add them to the provisioning profile. If the certificate you select in xcode was not used to generate the provisioning profile you selected in xcode, then you will probably get the error you mentioned. Think of the provisioning profile as the link from you as a developer (i.e. your certificate) and/or your devices to your app id (i.e. your project).

How can I upload an App UPDATE with a difference Developer Certificate

I've developed and published an App on the App store successfully last month. However, since then, my Mac crashed and (stupidly!) I didn't have a backup of my Keychain Certificates. I've had to generate a new Certificate and ultimately create a new Developer Certificate in the Apple Provisioning Portal.
As a result - despite being able to sign and deploy the updated App to my iPhone and iPad, I cannot upload it to the App store because the signing is different.
Is there any way around this? Do I have to re-write the App and submit it a new with the new signing keys?
I've seen the question:
Can I upload a new version of my iOS app with a different certificate/profile than the previous one?
but this doesn't answer my question/problem.
your application bundle identifier & provisioning needs to be same which is irrespective with which distribution certificate you have compiled the build provided that you are generating build (ipa) for appstore submission from the same developer account.
Fixed! I logged into the Apple Provisioning Portal, revoked all my certificates and deleted all my distribution an provisioning certificates. Then I deleted everything from XCode and everything from my KeyChain. I re-generated a new CSR from the KeyChain, generates a new certificate in the Provisioning Portal with this and then did the rest through xCode. It found and downloaded my development and provisioning certificates, one against my team, the other as "unknown". I clicked on TEAMS in xCode and did a refresh then returning to the profiles say everything set as valid. I signed the App with the new certificates and uploaded them. The App is not awaiting review :)

Resources