I suddenly started to receive the following email with the error in it stating that my uploaded app is not available to be used in TestFlight:
ITMS-90886: 'Cannot be used with TestFlight because the signature for the bundle at “MyApp.app/Contents/PlugIns/MyAppWidgetExtension.appex” is missing an application identifier but has an application identifier in the provisioning profile for the bundle. Bundles with application identifiers in the provisioning profile are expected to have the same identifier signed into the bundle in order to be eligible for TestFlight.'
It was all working fine and now I am not sure even where to start looking. Signing, provisioning and everything else is managed automatically.