iOS xxx has conflicting provisioning settings.xxx is automatically signed,but code signing identity…

现象

在开发过程中,经常会在GitHub上下载一些Demo作为参考,这些Demo会用于真机的运行,但是运行时经常会遇到一些证书的问题。

error: xxx has conflicting provisioning settings. xxx is automatically signed, but code signing identity 
iPhone Distribution: *****has been manually specified. Set the code signing identity value to "iPhone
Developer" in the build settings editor, or switch to manual signing in the project editor. (in target 'xxx')

下载GitHub或者运行其他人提供的项目(开发者账号和本机的不在一个开发组织下),选择项目的Target选择证书是自动。
Target状态

问题

证书的状态会出现以下error。
在这里插入图片描述
运行项目会报如下的错误
证书问题

解决方案

点击项目的Target----->Built Settings------>搜索“iPhone Developer”----->修改成"iOS Developer"(如下图)

修改前
修改前

修改后
修改后 修改完之后,真机正常运行。