改动项目APP名字后,在真机执行报错:The provisioning profile specified in your build settings (“haotian”) has an AppI

时间:2024-11-28 17:06:37

错误提醒:The provisioning profile specified in your build settings (“haotian”) has an AppID of “com.basecom.vipose” which does not match your bundle identifier “com.baseus.iTemperature”.  Xcode can resolve this issue by downloading a new provisioning profile
from the Member Center.

原因:是我在xxx-info.plist中Bundle display name 的值(用来改变APP在左边显示的名字),改动后再在真机执行就报这个错误。

解决的方法:

參考地址:http://*.com/questions/1760518/codesign-error-provisioning-profile-cannot-be-found-after-deleting-expired-prof

这里所说的就是要通过改动你的项目的.xcodeproj文件来解决上述的错误。

1.找到项目中的**.xcodeproj文件,点击右键,showpackage contents(打开包内容)。

2.打开后找到project.pbxproj文件,用文本编辑器打开。事实上就是右键。点击open就好了。

3.打开这个文件后,按command+F,在这个文件里查找“PROVISIONING_PROFILE",找到和这个“

<code style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:rgb(238,238,238)"><span style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent">PROVISIONING_PROFILE </span><span style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent">=</span><span style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent"> </span><span style="color:#8000;margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent;">"487F3EAC-05FB-4A2A-9EA0-31F1F35760EB"</span><span style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent">;</span><span style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent">
</span><span style="color:#8000;margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent;">"PROVISIONING_PROFILE[sdk=iphoneos*]"</span><span style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent"> </span><span style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent">=</span><span style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent"> </span><span style="color:#8000;margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent;">"487F3EAC-05FB-4A2A-9EA0-31F1F35760EB"</span><span style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent">;</span></code><span style="background-color:transparent">”相似的都删除。</span> 提示:能够通过查找“<pre name="code" style="margin-top:0px; margin-bottom:10px; padding-top:5px; padding-right:5px; padding-bottom:5px; padding-left:5px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:rgb(255,255,255); overflow-x:auto; overflow-y:auto; width:auto; max-height:600px; line-height:18px; text-align:left"><code style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:rgb(238,238,238)"><span style="color:#8000;margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; vertical-align:baseline; background-color:transparent;">487F3EAC-05FB-4A2A-9EA0-31F1F35760EB</span></code>

”(换成我们自己的),所有删除就可以


<span style="background-color:transparent">4.然后保存文件,又一次打开项目。

xcode会提示你又一次下载安装provisioning profile文件。

下载后安装上就能够。

</span>