Provisioning profile "iOS Team Provisioning Profile: com.xfinity.mobile.spamfilter" doesn't include the currently selected device . But there is no selected/built for device

I'm attempting make to make a distribution build of an app.

In the Xcode target the supported destinations has only iPhone and build active architectures only is set to NO.

I created an archive, then selected Distribute App/ Debugging, but then got this error:

Provisioning profile "iOS Team Provisioning Profile: com.abc.def" doesn't include the currently selected device "DT-iPad-XXXX" (identifier YYYY-YYYYYY).

I've no idea what this device is, it's nothing to do with me, somebody must have added it to the provisioning profile. But that should be beside the point shouldn't it? Because this device has never ever been connected to my Mac/Xcode and so can't be "the currently selected device".

So I tried again. I changed build active architectures to YES and connected an iPhone to the Mac/Xcode and created an archive again. But it was the exact same error.

What's going on, why is Xcode saying this iPad is the currently selected device when attempting to make a distribution?

Provisioning profile "iOS Team Provisioning Profile: com.xfinity.mobile.spamfilter" doesn't include the currently selected device . But there is no selected/built for device
 
 
Q