I'm using the data protection capability in my app, however I've found that Xcode will always display a warning if the type of the protection is anything other than NSFileProtectionComplete within the entitlements file.
Here's what Xcode displays:
However the data protection entitlement is present within the entitlements file:
If I click on the Fix Issue button then Xcode sets the Data Protection type to NSFileProtectionComplete:
But this is not what I want, but more importantly its not possible to run the app because there will be an error dialog: "The executable was signed with invalid entitlements".
This error dialog is displayed because the Data Protection entitlement of NSFileProtectionComplete does not match the type set in the app id:
The protection type in the app id has to match the protection type in the entitlements file otherwise it won't run, hence it has to be set to NSFileProtectionCompleteUntilFirstUserAuthentication within the entitlements file, but then doing that makes Xcode display the red error flag again and round and round and round we go in circles.
Any thoughts on how to make the red warning flag go away? Seems like this is an Xcode bug (its present in 8.3 beta and 8.2).