For me, the problem had to do with bundle identifier. I had manually edited the entry in Info.plist but the entry in Signing & Capabilities showed something else.
I changed in Signing & Capabilities and Info.Plist updated to a variable $(PRODUCT_BUNDLE_IDENTIFIER). I then had to clean the build, remove any previous apps installed and rebuild.
Hope this helps someone