真机调试出现问题,无法将应用程序装到设备上
在往真机上装应用程序的时候出现“The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.(0xE8008016).“的错误,致使无法将应用程序装到手机上。下面是自己的解决方法(自己在xcode4.2上操作有效):
1.单击xcode右上角的”Organizer“按钮,进入Organizer窗口然后选择devices进入设备窗口,在左边选择要装入的设备,然后单击左上角的”Provisioning Profiles“窗口将会显示已经一些证书,单击你正在用的证书,然后单击窗口最下方的Refresh按钮。然后重新运行程序,看是否能将应用程序装到设备上。我运行时是提醒了下面的错误”CodeSignError:ProvisioningProfile 487F3EAC-05FB-4A2A-9EA0-31F1F35760EB can't be found“,然后进行下步操作。
将所有类似于上面这种格式的语句删掉,整个文件好像有三处,总共六句话。删完后保存并关闭文件,然后关上xcode(需不需要关上不清楚,反正我是关上了)。最后只需要重新打开项目,运行程序就可以将程序装到设备上了。
以上是自己在xcode4.2上的操作步鄹,解决了“The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.(0xE8008016).“的问题。
参考文章:http://stackoverflow.com/questions/5333034/im-still-getting-the-the-executable-was-signed-with-invalid-entitlements-err
http://stackoverflow.com/questions/1760518/codesign-error-provisioning-profile-cannot-be-found-after-deleting-expired-prof
---------------------------------------------
Iphone真机调试出错:launching remote program: failed to get the task for process XXX
在真机上调试时,无法正常启动程序,出现问题launching remote program: failed to get the task for process XXX
在网上找了一些方案都说将”get-task-allow“设置为false,试了不行,按下面的方法设置,就可以了
(1)在Xcode的File菜单上,New File -> iOS -> Resource -> Property List -> Entitlements,新建了一个“Entitlements.plist”点Finish,然后打开此文件,设置一个“Can be debugged”属性为YES,保存。
(2)切换到项目的“Tagets”,在"Build Settings"设置:CODE SIGN ENTITLEMENTS = Entitlements.plist。
该解决方案在Xcode4.0下测试通过。