What happen If I remove all apple certificate, profile? - xcode

I have some trouble with Xcode11, and anual renew certificates. So I'm lot of lost and have no response about my trouble.
So I add a new question, perhaps more simple:
What happen if I remove ALL trace of certificate, profile, if I clean all. Can it affect my current production app, or can i still update ?
I suspect conflict from lot of certificate test, but no other idea.
Thank you

Let's say you go to the developer center and revoke/delete all certificates and profiles. And on your computer you delete all certificates from your Keychain, and you delete all profiles from the MobileDevice folder.
Then if you have an app on the App Store, it will continue to work; users can still download it. But you will not be able to submit any updates to it and you will not be able to run any projects on a device.
You could then fix that by obtaining new certificates and profiles, which you can probably do automatically; in fact, if you try to run a project on a device, it will likely all happen automatically.

Related

Xcode 9 automatic signing failing

I had successfully uploaded an app for TestFlight but after archiving and uploading now it is giving me this error I can't explain. Just to make sure I unchecked all entitlements in the capabilities target tab but that doesn't seem to matter.
I looked over all the app id's, certificates and provisioning profiles but there's nothing that looks abnormal. I would look in the actual .plist file generated by Xcode but I don't see where it is or if it even exists. Where should I even check to verify what's going on? Xcode is a buggy mess so I don't even trust this isn't some random bug (I cleaned the target of course just to make sure).
Automatic signing is unable to resolve an issue with the "..."
target's entitlements. Switch to manual signing and resolve the issue
by downloading a matching provisioning profile from the developer
website. Alternatively, to continue using automatic signing, remove
these entitlements from your entitlements file and their associated
functionality from your code. Then rebuild your archive and try again.
Provisioning profile failed qualification Profile doesn't match the
entitlements file's value for the application-identifier entitlement.
I had a terrible time with some old projects where I had to use manual signing because I couldn't get automatic provisioning to work. Then I discovered the following solution, which has worked for me 100%:
Switch to automatic provisioning if you haven't already.
Edit the target build settings and search for Sign. You should see four Code Signing Identity entries and they should all say iOS Developer. (If one of them says iOS Distribution, that's the kiss of death.)
Still editing the target build settings, search for Provision. Scroll down to the bottom and see if there is an explicit extra provisioning profile setting giving a profile number. If so, delete it.
Edit the target capabilities. Turn Game Center and iCloud and In-App Purchase on. Now turn them off again. This will give you an empty entitlements file (you can confirm this in the project navigator).
You will now be able to build to a device, archive, and export to the App Store, using automatic signing throughout.
I have had a very similar issue with Xcode 9.4, the only difference being that the error referred to issues with both the application identifier and keychain access groups entitlements.
I switched from automatic Xcode signing to manual signing to try to fix the problem. After some mucking about that did not help (and that I don't think contributed to fixing the problem) I ended up re-enabling the Xcode automatic signing. This appears to have fixed the problem. I was able to clean, archive and upload without any issues.
Not a particularly satisfying answer, but it worked for me.

Xcode; no certificates; missing previous developer

I have a tricky situation here. I have an app, where the previous developer is not available; so i can't get get an export of the certificate idenetifiers
The app already has an approved version on appstore
I would like to release an update, but as i mentioned i do not have any access to previous developer
I have so much confusion right now...
Can i remove the existing bundle in itunesconnect and recreate a new one with the same bundle id? So that i can submit a new version with the same bundle it (create certificates and stuff from scratch)
If at all i can remove, will this effect existing app in appstore?
Is there any way i can create new provisioning profiles for the existing certificates? (I tried, with the message missing private key)
Any suggestions are highly appreciated
Thanks
I'm going through a similar situation myself, some research landed me on an Apple document that reads:
"
Important: Re-creating your development or distribution certificates doesn’t affect apps that you’ve submitted to the store nor does it affect your ability to update them.
"
So, it seems to me that I can recreate the certificates and the provisioning profiles without impacting the current App or its future updates.
Here´s the link : https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW6

Provisioning Profiles in Xcode - can't shift this error

Please don't dismiss this as a duplicate without reading fully - I've scoured the net and stackoverflow and found many questions like this, but none of the fixes work and I'm not sure why.
It doesn't help that the xcode configuration is still offline at the dev center, but I should still be able to do this manually.
I'm preparing an app for submission and the code signing of the Archive isn't working.
Provisioning profile 'Company Distribution' specifies the
Application Identifier 'Company.*' which doesn't match the current
setting '2Cxxxxx3D5.Company.App'
So the issue is that it thinks the provisioning profile doesn't have the prefix of my apple developer ID, and when you look at the code signing options under settings you'd be inclined to agree, it says "Company Distribution for Profile Bundles 'Company.*'"
However, in organiser the profile clearly says '2Cxxxxx3D5.Company.*'. The App ID is right in Organiser but for some reason is then wrong in the code signing dropbox.
So far I have
Deleted all the profiles from my machine
Deleted all the profiles from the ios center
Cleaned the build, emptied the build directories
Restarted my mac
Restarted my iPad
Used the javascript hack to insert the Device IDs into a new provisioning profile, with a new appID, re-downloaded it and re-imported it.
I have exactly the same error with exactly the same symptoms again, I just can't work out why the profile is clearly correct in Organiser but then doesn't seem to translate through to the profile screen.
Can anyone throw any insight my way please? :)
Ahh the joys of codesign -- it has tripped up many developers trying to get build configuration setup. This too is a mismatch between a few different settings in Xcode and potentially your App Store Distribution Profile. There are three places that you have to make sure are set identically to ensure this error clears, each of which is tied to the AppID. I answered a similar question relating to a Development Certificate and Provisioning Profile, however the same set of checks is required for your App Store distribution certificates and provisioning profile:
A valid provisioning profile matching the application's identifier could not be found
That question includes some additional information about where particular settings are located, and the process by which one would go through to go from code to device build. A nearly identical process could be used to setup for App Store Distribution -- replace references from "Development Provisioning Profile" to "App Store Distribution" profile as well as omit those test device configurations that aren't applicable to Distribution builds and you should be good to go.
Should you rather try and debug using what you currently have, then read on:
At the core of code sign is the need for your AppIDs to match up in each of the documents issued by the 'Certificates, Identifiers, and Profiles' tool as well as in the build configuration of your Xcode project. There are a few ways in which you can solve the issue, either changing your provisioning profile and signing settings to match the same AppId, or changing the AppID to match your provisioning profiles. It is important to understand the ramifications of this decisions -- Unless you specifically need shared keychain access and specifically do not need any entitled services (In-App Purchase, Push Notifications, iCloud, Game Center, Newsstand, Data Protection, etc.) the option with the least restrictive results is to change your provisioning profile to match your current AppId.
Quickest (but most restrictive) route to a successful codesign build
Your description of the error certainly confirms the root problem -- You have a Distribution Profile named "Company Distribution" set to an AppID from the Certificates, Identifiers, and Profiles tool that is "Company.", however your App Specifies an AppID of "2Cxxxxx3D5.Company.App" which does not match the AppID that code sign is using. Put a different way, your project is configured to set the Bundle ID to "2Cxxxxx3D5.Company.App" while you are attempting to codesign a bundle "Company.". The "2Cxxxxx2D5." part violates the provisioning profile you (or perhaps the Xcode Automatic Profile Selector) has picked for your archive codesign operation.
The "2Cxxxxx3D5." part of your AppID looks suspiciously like an App ID Prefix -- this should not be specified in the Xcode App ID field (or in the Info.plist where that field's value is derived. Xcode automatically handles the App ID Prefix for you based on the Provisioning Provisioning Profile used to do code sign. If your Xcode App ID contains this prefix value remove it so that your App ID becomes "Company.App". In doing so, your Application's App ID becomes a valid App ID given the "Company.*" Distribution Provisioning profile that the error indicates is being used during code sign.
More sustainable fix -- Fix the AppID and Reissue the Distribution Provisioning Profile
As Apple continues to release 'entitlement' based services, it may not be agreeable to issue this app under the wildcard Provisioning Profile. Instead, the best way to retain the widest flexibility is to issue an explicit AppID for your Company's app, reconfigure Xcode, and reissue the Distribution Profile for that new explicit AppID. The linked answer above serves as a step-by-step guide for how to do each of these tasks except the Distribution Provisioning Profile. At a high level, the tasks to complete are:
Update the App ID in the Xcode project to omit the TeamID / App ID Prefix.
Ensure that the edited App ID is registered with Apple's Certificates, Identifiers, and Profiles tool.
Issue a Distribution Provisioning profile for the new bare-bones App ID
Install to Xcode, restart Xcode, then ensure that the Codesign Settings are using the new Provisioning Profile and Signing Identity.
Run the Archive.
Once you get the App ID matched up to the one encoded in the Distribution Provisioning profile you should be in a much better state to run your Archive. If you run into additional questions or problem, tack a comment on to this answer and we can see what we can do.

"Application failed codesign verification" - Pulling my hair out

I'm trying to submit an update to my app. I had messed up some files, so had to generate from scratch all of my the certificates, keys, and provisioning files. Would that be a problem for updating? I read someone saying that updates to the app HAVE to be done using the same provisioning file... that can't be true, can it? Otherwise, I'm in major trouble.
Anyhow, my archive builds keep failing validation. I have triple checked that I'm using the Store Distribution certificate for my release. I also ran codesign command and it came through fine. I have also checked the contents of MYAPP.app bundle and the "embedded.mobileprovision" is there. Why does it say "Failed to load"?
Below is the output I get in my log. Any ideas?
(using XCode 4.0.2)
warning: Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
Executable=/Users/anna/Library/Developer/Xcode/DerivedData/MYAPP-fjmzhplryhwnsrgcsoyuivpwrojd/Build/Products/Release-iphoneos/MYAPP.app/MYAPP
codesign_wrapper-0.7.10: using Apple CA for profile evaluation
AssertMacros: signer, file: codesign_wrapper.c, line: 610
AssertMacros: profile, file: codesign_wrapper.c, line: 914
codesign_wrapper-0.7.10: Failed to load provision profile from: /Users/anna/Library/Developer/Xcode/DerivedData/MYAPP-fjmzhplryhwnsrgcsoyuivpwrojd/Build/Products/Release-iphoneos/MYAPP.app/embedded.mobileprovision
- (null)
You should remove your distribution certificate from your system. Revoke that certificate from developer portal, create a new one. delete the old provision profile and create a new provision profile for app store and use that.
I ended up resolving my issue by moving over to a different machine that had a clean install of all the dev tools. My original install got corrupted because I foolishly installed beta version over it and then tried to revert back, at which point codesign didn't want to play along anymore. I know that wasn't the smartest thing.. but sometimes you do things for the first time and learn the hard way :)
Anyhow, the good news is that new keys and certificates don't really mess things up and life can go on but watch where you install beta versions!
In dev center you can read that it is critical to store your private key somewhere save. It also says that this private key cannot be reproduced if lost.
Therefore I think you are in trouble.

Is there only one distribution certificate per team leader or one per application?

I'm confused by the dev and dist cert. I got one app in the store, but I named my certs after my first app. Was this a mistake?
I'm ready to go on my second app. But XCode is selected the dist cert with the old app name on it. It built without error. Though I named it wrong, will it still work? XCode is automatically picking this cert for me.
Is this right? You need a new app ID for each app so you can 1) put in plist, 2) put in code signing section on Build tab of Target info, but you don't need a new dev and dist cert for each new app.
Therefore is this right too? For each app you develop, you only need your original dev and dist cert, but a new app ID for each app.
This is so obscure! I wish apple had done a better job!
All of these issues are fixed in the current (as of 7/2011) new processes Apple has in place. The Provisioning Portal cleaned up this mess and now it's not too hard. Still step-laden, but 1000x better than it was before.

Resources