For future readers
This could be a Certificate / Provisioning profile issue.
I just had this issue after wiping my mac and reinstalling OS X (i.e. all my certificates and profiles was gone from my keychain), and I did the following to fix it:
Delete / Revoke any existing certificates and Prov. profiles. (In my case Xcode had tried to download the certificates for my old computer, and they somehow became invalid in doing so).
Then, in the following order:
- Create a new Development AND Distribution Certificate
- THEN create a Provisioning profile for Development AND Distribution
Xcode signs your app with your Distribution certificate when it builds it for TestFlight, or the app store for that matter. That's why it is important to have a Dist. Cert. when uploading to test flight even thought it's just for internal testing. I don't know if it matters wether you have a valid Dev. certificate and Prov. profile for test flight, but it doesn't harm to have it. You need it to build to your phone anyways
I hope this helps.
]