There is this black magic, that if you are seeing something is wrong / not working with Xcode, you may just need to restart it
For example, today I encountered into this issue:
No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “......”, however, no such provisioning profile was found.
The first thing came into my mind is to restart the Xcode. And you know what? It works!!