Every time when i deal with code signing and provisioning profiles strange things happens. Most times i get the error "no code signing identity found" and if not then something like "no matching provisioning profiles found" and "no provisioning profiles with a valid signing identity".
Although i am quiet familiar with the theory and the things behind code signing and provisioning, there are still lots of pitfalls I everytime ran into and i don't know how to deal with. Sometimes it fails when setting up a new App, sometimes not.
There are 5*2 different ways to select code signing identity. What is the difference between them? And if i select one for debug and one for release, what is the reason for the "Any iOS SDK"?
Also, there are two places giving this dialog: Project-Settings -> Buildsettings is the first place, and also for the Target under Build Settings. Both are not in sync, so if i change the code signing at the first place, i have to change it twice in the second place. Is there a way to keep them in sync?
Which code signing identity would fit best into the various lines (debug, debug -> any ios sdk, release, release -> any ios sdk), since i can choose between developer identities and distribution identities (i could imagine, that the distribution one is for release and the developer one is for debug, but because of everything fails, i don't know.
What I did:
There a valid certificates in the Member Center deposited for each developer of our team and one for ad hoc distribution for the Team. We also created AppIDs which reflects exactly the same setting in the Project Settings. In between we avoid using Variables and use the exactly appid also in project-settings to reduce risks on this side and to simplify things.
When switching the provisioning profile from "Automatic" to a specific Profile for this App, the code signing identities change to different values, which are also not in sync between the project settings and target build settings:
On the Target->Build Settings we get this result:
On the Project -> Build Settings we get a different result:
Which one would be more accurate? After "Product" -> "Archive" -> "Validate" we get the following error:
It doesnt matter here if we select different Code signing identities or not. Actually, just for playing 'trail-and-error', we tried out nearly every multiple combinations of code signing identities to learn what XCode would do then.
After this error message from Archive->Validate the previous selected provisioning profile is replaced with another one named by a randomly generated string:
Who can tell me what happens here and how to solve these issues?
I've read a lot of documents regarding this topic. But most tutorials around this topic are outdated since several changes happened between XCode 4 and XCode 6. Even the apple documents offer mostly screenshots based on outdated XCode versions and also outdated versions of Member Developer Center.
As Ian McDonald pointed out correctly, the last question (covered by the last 2 screenshots) is answered. After recreating the Provisioning Profile it won't be replaced by randomly generated strings, but the IPA-creation is still not working with "no code signing identities found".
What it looks like now: