I followed your steps and added the Entitlements.plist file to my project. I also added the get-task-allow field and set it to a boolean and unchecked the box. I go to build
I have exact error when I open a project written on different machine with different profile.
So here is how I fix it: Assume that my profile is DevelopmentProfile.mobileprovision, I copy that file to a directory, and run this command:
security cms -D -i DevelopmentProfile.mobileprovision | grep -A12 "Entitlements"
Then I copy the output XML and paste it in a file called Entitlements.plist, put it under the project's directory.
Then in Build Settings/Code Signing, you can select the signing identity correspondent to the DevelopmentProfile.mobileprovision.
This should solve the problem.