Thanks. This also worked for me.
In XCode, go to the Runner > Build Settings > Signing > Code Signing Entitlements
Make sure that you have the correct file in the Debug. Do not leave it empty and copy and paste the Profile one there.
Debug
Profile