I added the Entitlement to my app in the developer portal first via the instructions here ->
Provisioning in Xcode with additional capabilities (https://developer.apple.com/help/account/reference/provisioning-with-managed-capabilities)
I then went into Xcode and followed the instructions to add com.apple.developer.contacts.notes, Bool YES , to my app as described here ->
com.apple.developer.contacts.notes(https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_contacts_notes)
If the .entitlement file dose not exist in Code go to you app target, Signing and Capabilities and add something like App Groups (remove after if not required)
This is also a necessary step to get Xcode to redownload a new provisioning profile. With out adding something new in Signing and Capabilities Xcode won't launch your app with the com.apple.developer.contacts.notes string in th e.plist. It just won't launch.
You need to force Xcode to detect the differences between your currently issued provisioning profile and the entitlements.plist, and then request a new provisioning profile from you developer portal.