The executable was signed with invalid entitlements 0xe8008016 - Distribution certificate
Look into the test target, the team should be the same in both the test target and the main target.
Issue is due to distribution provisioning profile try using development or Ad-Hoc provisioning,Hope it's work ,Good luck
In my case, before the build I have added a key ITSAppUsesNonExemptEncryption
in Info.plist
which may not included in the provisioning profile. After removing ITSAppUsesNonExemptEncryption
from Info.plist
I am able to build successfully.