Here are the steps that resolved this error for me.
I created new CSR, Certificate and Profile as part of this.
Login into https://developer.apple.com/
Go to “Certificates, Identifiers & Profiles” section.
Go to Devices and make sure your iPhone is added there. If not please do so with the UDID of your phone.
Go to certificates.
Create a new certificate by clicking on the plus button.
Select “Apple Development” and click on Continue button.
It will ask you to upload the Certificate Signing Request (CSR) file.
Now from the MAC system where you have Xcode IDE,
Go to Applications > Utilities > Keychain Access.
In the menu bar, go to Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority. (From the system menu on the very top)
Enter your email address and the Common Name (your name or the name of your organization).
Choose “Saved to disk” for the request method.
Click Continue.
Choose a location to save the CSR file and click Save.
Now, back to developer portal choose the CSR file and click on Continue button.
Download the certificate file by clicking on the “Download” button.
Go to Applications > Utilities > Keychain Access.
In the menu bar, go to File > Import Items. (From the system menu on the very top)
Navigate to the certificate file downloaded above and select it.
Choose the login keychain and click Open.
The certificate will appear in the selected keychain. Double-click it to open its details and verify the information.
Go to Profiles.
Click on the plus button to create a new profile.
Select “iOS App Development” option and click on Continue button.
Select the correct App ID (Make sure it has correct package on it)
Select offline support as Yes
Click on Continue
Select the certificate you generated above.
Click on Continue
Select your iPhone added under devices above.
Click on Continue
Enter a name for the profile.
Click on Generate button.
Download the profile by clicking on the Download button.
Open the Xcode and click on the root node of the project.
Open “Signing and Capabilities” tab.
Click on “Provisioning Profile” select box and select “Download Profile”.
Click on the profile name created above and click on the “Select” button. (It may give some err but will resolved with build settings)
Open “Build Settings” tab.
Under “Code Signing Identity” select the Certificate you added to the Key Chain above for all the options. Refer below.
Under “Provisioning Profile” select the profile you created above for all the options Refer below.

Select your iPhone as run destination and build the project.
The build may ask for a password for key chain. Enter the MAC password and click on “Always Allow” button.
Now select your iPhone as run destination and run the project.