Application failed codesign verification during validation in Xcode 4.2 - xcode

I am experiencing trouble with the distribution provisioning profile.
I have tried for many times to create a distribution provisioning profile using the instruction: http://developer.apple.com/ios/manage/distribution/index.action
But when I verificate the program I get an error:
Application failed codesign verification. The signature was invalid, or it was not signed with an iPhone Distribution Certificate.
I have done the steps as follows:
1.I have created certificates in key chain access.
2.I have created provisioning profiles in iOS Provisioning Portal
3.I have created an application ID
4.I have set provisioning profiles in the Code Signing section in Xcode
Besides, I have checked that there are no duplicate or out dated certificates in key chain access.
I have looked through stackoverflow and have not found a solution.
What can be the problem?

Please check if you have done this:
1) one Development Certificate in the iOS Provisioning Portal
2) downloaded the Development Certificate onto your Mac and installed it in on your Mac (open it, after download it, so the keychain will open and you see the Development Certificate
3) Check if in the iOS Provisioning Portal exists a Provisioning Development Provile, signed with the Certificate you added in step 2(above) in the Keychain).
4) Have you used a wilcard for the AppId, or added you a String? Under Provisioning Profiles under the row App Id there is a String like this: **********.text. If you have something like this CD8V98ZN8M.* (first characters bevore the . are different, but the star after the point is important, then you can sign with this Provisioning profile every app. If there is something like this: CD8V98ZN8M.appname, then your Bundlename set up in your Target in xcode must be exacrly appname.
5) did you download the Provisioning Profile and installed it in Xcode by moving the provisioning Profile onto the Icon?
6) Try to rebuild after made a Clean, if it still fails check the Code signing Identity under Bild Settings in your Application Target in xcode, what and select your Development provisioning Profile and then make a Clean and try to rebuild.
But also check out this Question: How to solve "Application failed codesign verification" when uploading to iTunes Connect?

I solved my own problem. One old version of XCode 4.2 has a bug with codesign verification, so i've just updated XCode 4.2 to newest version and my app succeeded verification. Thats it! Always check for updates! =)

Related

Visual Studio App Center Rejects Provisioning File and Signing Cert Combo

I am attempting to set up an iOS build and distribution flow on Visual Studio App Center for my React Native application using the bare expo workflow. I am running into an issue where App Center rejects my iOS provisioning profile and signing certificate due to the error: "Provisioning profile 'profile name' does not include the provided signing certificate"
This seems like a cryptic error since I know that my provisioning profile does contain the signing certificate that I used and I have verified this in XCode. I have been able to build and sign XCode builds using manual signing with the profile and cert, but when I try to add them to the "Sign Builds" step of App Center builds I get the error mentioned above.
I have attempted to find similar issues to this on various forums and on StackOverflow, but have been unsuccessful in finding a successful solution for me. Here are links to a few of the solutions which I have tried:
AppCenter Build error "Provisioning profile does not include signing certificate apple push services"
https://forums.xamarin.com/discussion/153425/appcenter-build-error-provisioning-profile-does-not-include-signing-certificate-apple-push-services
I would be happy to provide any further information if it is helpful.
Thanks in advance.
Image of Error received on App Center
problem for me was that my distribution certificate expired. so I had to create a new one and edit the provisioning profile to hook it up with the new certificate. with this set up App Center gave me the exact same error even though I was able to sign my app on my local machine with the same cert and provisioning profile.
Solution was I had to create a completely new provisioning profile instead of editing my old one.

Xcode 8.3.2 signing errors

I have Xcode 8.3.2 on Sierra. I am trying to build an Enterprise .ipa (have Enterprise membership).
I am having issues signing my app. Specifically in Xcode I have the following under General\Signing:
Automatically manage signing is enabled
Team: "My Team (Enterprise)"
Provisioning Profile: Xcode Managed Profile
Signing Certificate: iOS Developer
Status
Failed to create provisioning profile "com.myapp" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.
No profiles for 'com.myapp' were found. Xcode couldn't find a provisioning profile matching 'com.myapp'.
My steps were:
Logged into Enterprise account at https://developer.apple.com/account/
Under Certificates, Identifiers, and Profiles I selected the Add
Selected In-House and Ad Hoc
On my MAC in the Keychain Access I selected KeyChain Access\Certificate Assistant\Request a Certificate from a Certificate Authority
Saved to my desktop
In https://developer.apple.com/account/ I uploaded the certificate signing request
I see it as a certificate as type iOS Distribution with and expiration date
I download the .cer file and double click on it to install it
Within Xcode\Preferences I find the Team under the Apple ID and under Manage Certificates I see iOS Distribution Certificates and Enterprise with today's date
I select the Download All Profiles for that team
In Xcode I select General\Signing and "My Team (Enterprise)
At this point I get the two errors described above.
I am new to Xcode development so I am sure there is something wrong with my steps.
Any insight would be greatly appreciated.
Well the solution to my issue was to do the following:
In Xcode under the "General" tab to disable Automatically manage signing
At https://developer.apple.com/account in my enterprise account under provisioning profiles I created a new distribution profile
Downloaded the profile => .mobileprovision file
Double clicked on the .mobileprovision file
With Automatically manage signing disabled I then selected the Provisioning Profile I just created and downloaded in the drop downs for Signing (Debug) and Signing (Release)
At this point I was able to archive and export an enterprise .ipa
This is the solution to my issue that's similar to this one:
Change your bundle identifier to a unique string to try again.
Your bundle identifier is already in use by other developers I guess, so just change your bundle identifier in the Identify tab right above your Signing tab to another one:
For example:
Bundle Identifier: org.react.native.example.RamenForLifeIn2022
Hope this helps :)

Xcode 7.1.1 Error - No provisioning profiles matching an applicable signing identity were found

I have a game in Unity 5 and exported iOS build. Opened the project in Xcode and selected correct Team and Provisioning Profile. Xcode than shows an error "Code Sign error: No matching provisioning profiles found: No provisioning profiles matching an applicable signing identity were found".
I checked Apple Ids in Preferences->Accounts and found that its showing a Reset button for all the Signing Identities including iOS Distribution except iOS Development.
I have private key showing in Keychain for the team, both for development and distribution.
WWDR certificate was expired, so I deleted that and installed correct one.
I am pulling my hairs over it for more than 6 hours but no clue so far.
Please help...
Simply create your developer distribution certificate once again and installed it.
Check there will be any default provisioning profile like start with * or generated by xcode then delete it and generate once again and installed.
Its working fine..
Deleted all the certificates/provisioning profiles and imported it fresh in xcode and it worked. Don't know why but it worked.. :)

XCode is unable to create a distribution signing identity

I am trying to submit my app to iTunes Connect. I have submitted it before(TestFlight) but at some point my certificates have stopped working. I have tried to renew them with 2 different approaches without any success.
Approach 1: In XCode I get the error that says that the developer profile already has a distribution certificate and suggest me resetting it. Resetting results in the same pop up window so this goes into a loop and does not work.
Approach 2: If I create the certificates and profiles manually in developer portal the archiving process only works if I select the correct identities in the build settings, otherwise the build fails and XCode says that it can not find code signing identities. But I cannot submit the archive because the following error occurs:
I have also tried exporting the .ipa from the archive(to upload it with Application loader) but this does not find the signing identities as well with the same error:
So now I am trying to go the suggested route where XCode is supposed to do all the work for me.(https://developer.apple.com/library/ios/qa/qa1814/_index.html) For a clean slate I have deleted all certificates, key-pairs and provisioning profiles from my mac and developer center.
I have removed all relevant keypairs and certificates from keychain. I have deleted all the provisioning profiles from my mac. I have also deleted all certificates and profiles from the developer site. I have also deleted and re-added the developer account in XCode settings.
I set the project's build settings:
I also set the team in general tab.
Now I guess XCode is supposed to fix my signing issues but after I press fix issues below the team option in general tab
I still go to the reset development/distribution certificate loop.
One thing I notice is that XCode does generate a key-pair to the keychain but not the certificate.
How can I upload my app to iTunes Connect with or without these problems?
Im using XCode 7.2 and this is a Unity3D app.
I have removed all relevant keypairs and certificates from keychain
Okay, but that is what Xcode is complaining about (each time it says "but it is not installed locally" in all the messages you have displayed). You need the private/public certificate pairs in your keychain. If you deleted the private half of the certificates, that is a huge mistake, because you can never restore it (Apple does not have it — it is private). You now will probably have to start all over again by throwing away absolutely everything — all certificates, all provisioning — both locally and at the member center, and beginning from scratch.
This can be done, but it is not trivial, because if you launch Xcode while any remnant remains, Xcode will try to install the certificate back into your keychain. To do it, you would need to delete everything from the keychain, mobile provisions folder, and member center, with Xcode not running.
I managed to upload the package by extracting the .ipa from the archive with
xcodebuild -exportArchive -exportFormat ipa -archivePath {path-to-xcarchive} -exportProvisioningProfile {“profile name”} -exportPath ~/Desktop/MyApp.ipa
and then uploading it with Application Loader.

Provisioning Profile 'Valid signing identity not found' error

I have an app that is ready for testing on my iPad, and I've created a development provisioning profile, matched up the bundleID and lowered the iOS deployment target.
However when I downloaded the profile and dragged it into the organizer, it says 'Valid signing identity not found'. I'm pretty sure this has got to do with the certificates in the keychain and private keys (???) however I have no idea how to fix this problem.
Can someone please point me to a tutorial or give me some advice on adding certificates into the keychain without using Xcode; stuff like the 'use for development' button isn't working for me!
Note:
The only valid Provisioning Profiles are distribution.
When I try to click 'Renew' Xcode says 'No value was provided for the parameter 'CertificateIDs'. I hope this helps!
The .p12 file associated with your provisioning profile is not found in your system keychain.
Check the below few things!
Make sure you have enabled the correct certificate while generating the provisioning profile in the apple developer site.
Check if you have any duplicates of the your certificate & private key more than once in your keychain access.
If you do not have the .p12 corresponding to the provisioning profile, Get it exported from the mac system on which it was created & install it in your mac system.
Check your code signing identity set your profile there.
and your Provisioning profile bundle id is same as your app bundle identifier.
To do a valid code-signing - without using XCode - you need a valid certificate and key, corresponding to the provisioning profile :
check with Keychain Access that you indeed have a 'iPhone distribution' certificate, with its own private key.
Make sure this is the same certificate that was used on 'provisioning portal' to create you developement / distribution profile. If not, create a new one, or import the certificate from the other Mac you used when you created the provisioning
Download the provisioning profile, and just double-click it.
Posting this here because none of the other answers really went into enough detail to help me and I still had to figure it out on my own.
On the apple developer website, log in and under certificates click 'All'. The certificate needs to be generated on YOUR machine and with YOUR account or things do not build. This is what confused me... You can click the + icon and make a new certificate (development, or distribution). If it does not let you select for example Distribution, it's because there are already too many certificates in the account. So first, you have to delete an older certificate.
1) Delete the oldest certificate in the portal
2) Click the + and create a new certificate -- this will guide you through opening Keychain Access on your machine and requesting a certificate from apple, and you will have to save a file and upload it to the developer portal to create the certificate.
3) Download the new certificate and it will add to Keychain access
4) Go back to provisioning profiles on dev portal, click EDIT on the one you are trying to use and change it to use the newly generated certificate.
5) Download and click the provisioning profile
6) Everything works great.
This process actually was not that difficult, but for some reason I could not find the correct explanation anywhere. I hope this will help someone.
I had the same issue. I did have all the private keys and everything was correct, but xcode refused to build and kept saying that I didn't have a valid provisioning profile and organiser showed 'valid signing identity not found'.
The solution involved:
revoking my developer certificate and development provisioning profiles from the ios provisioning portal
deleting those certificates from keychain
try building again and tell xcode to 'fix issue'
This lets XCode manage the certificates, and it magically worked.
However on another project I still had the problem, and it was solved by this answer:
https://stackoverflow.com/a/18966088/1192732

Resources