I wan\'t to select my distribution profile in Code Signing Identity in the build tab of targets. But all my certificates (developer, ad hoc, ...) are grayed out
Under
Provisioning -> Distribution -> Distribution Provisioning Profiles
I downloaded the desired certificate again and installed it. Now I don't see an empty file in Xcode. The build also works now (no code sign error).
What I also did: I downloaded the WWDR and installed it, but I don't know if that was the reason (because I think it's always the same)