首页 > 代码库 > 修改项目APP名字后,在真机运行报错:The provisioning profile specified in your build settings (“haotian”) has an AppI
修改项目APP名字后,在真机运行报错:The provisioning profile specified in your build settings (“haotian”) has an AppI
错误提醒: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://stackoverflow.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>
修改项目APP名字后,在真机运行报错:The provisioning profile specified in your build settings (“haotian”) has an AppI